Identify the shape file you are wanting to import move it to a c:\shp\ directory and then using your known server parameters run from command line to import. No table needs to exist in the database before running the command. There are a number of defaults that can be overwritten if you wish. If you don’t identify the name of a table it will take the prefix of your shape file. Likewise it defaults to local host on port 5432.
This online tool will create the command and hopefully speed up the creation of commands to import SHP files into your PostGIS enabled Postgresql databases.
Assumes you are using the UK SRID of 27700 but this can be altered.
-I parameters is an insert command you can replace this with -a which will mean that the shapefile is appended to the existing table. You will need to make that adjustment manually. Similarly to the other tools runs from the command line in the relevant directory in which you have installed your psql command line tools.
–
shp2pgsql -I -s 27700 c:\shp\testpolys.shp mytablename | psql -h prodserver -p 5432 -U mark -d targetdatabase
–
