Convert Shapefiles to SQL
The PostgreSQL /bin folder contains an executable capable to perform the conversion:
shp2pgsql shape_file_name myschema.dbtable_name > output_file.sql
psql -d database_name -f output_file.sql
One command conversion and upload to the PostgreSQL can be done all in one step using UNIX pipes:
shp2pgsql shape_file_name myschema.dbtable_name | psql -d database_name
This also works on Windows cmd.exe, surprisingly enough.