I want to import a shp file to postgreSQL. First I create sql file and then run PostgreSQL. To create sql file, I run this command in windows cmd:
shp2pgsql -s 4326 worldCountries.shp worldcountries postgres > worldcountries.sql
and then run:
psql -d postgres -U postgres -p 4321 -f worldcountries.sql
but result is:
psql: worldcountries.sql: 21: ERROR: function addGeometrycolumn(unknown, unknown, unknown, unknown,unknown, integer) does not exist