Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to load a shapefile ( into PostGIS 2.0.1 using pgAdmin3's PostGIS Shapefile Import/Export Tool.

enter image description here

However its not allowing me to import the shapefile, showing the error messages below. Any idea what happen?

Output from PostGIS Shapefile Import/Export Tool

Importing with configuration: statesp020, staging, geom, C:\gisdata\statesp020_nt00032\statesp020, mode=c, dump=1, simple=0, geography=0, index=0, shape=1, srid=4269
Shapefile type: Polygon
CREATE TABLE "staging"."statesp020" (gid serial,
"area" float8,
"perimeter" float8,
"statesp020" float8,
"state" varchar(20),
"state_fips" varchar(2),
"order_adm" int4,
Failed in pgui_exec(): ERROR:  function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist
LINE 15: SELECT AddGeometryColumn('staging','statesp020','geom','4269...
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Shapefile import failed.
share|improve this question
up vote 1 down vote accepted

It looks like the loader you're using is from 1.5 or lower, while the database you're loading to is 2.0. Either (a) move to the latest loader or (b) add the "legacy.sql" file into your postgis database to ensure that all the old function signatures the old loader expects are available to you.

share|improve this answer
I cant seem to find the newest shp2pgsql-gui.exe loader for Windows, im using the latest version that I can find. Any hints on where to get the updated version? – Nyxynyx Apr 3 '13 at 0:12
Particularly on Windows I'd expect it to be bundled with the latest PostGIS software... afraid I can't help you. – Paul Ramsey Apr 3 '13 at 16:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.