I am trying to import a shapefile to my database in postgres but there is no shapefile loader appearing in the plugin menu in PgAdmin.
Postgis is definitely installed as I have added it as an extension to my database
The postgis extension has already been created. But I continue to get a syntax error:
postgres=# CREATE EXTENSION postgis;
ERROR: extension "postgis" already exists
postgres=#
postgres=# shp2pgsql -I -s 4326 /Users/alexander/Downloads/pluto/pluto.shp pluto | psql -U postgres -d postgres;
ERROR: syntax error at or near "shp2pgsql"
LINE 1: shp2pgsql -I -s 4326 /Users/alexander/Downloads/pluto/pluto....
^
postgres=#
Any idea as to what the problem could be?
Best Answer
To load shapefile to postgres database
OR
Connect to your database from within QGIS.
Then use Database manager to import your shapefile to your desired postgres database.