[postgis-users] Unable to import shapefile using Shapefile to PostGIS Importer

Smaran Harihar smaran.harihar at gmail.com
Thu May 17 12:07:55 PDT 2012


Hi I am trying to import shapefile into the Postgres database that I
created in PGAdmin3 using the Shapefile to PostGIS Importer and despite the
connection being successful I am receiving the following error,

Connection: host=localhost port=5432 user=admin dbname=shpRepo
password='**********'
Destination: public.AllQuebecSpecies
Source File:
/home/smaranh/development/Biodiversity/biodiversity/shapefile/AllQuebecSpecies
Shapefile type: Point
Postgis type: POINT[2]
Failed SQL begins: "SET CLIENT_ENCODING TO UTF8;
SET STANDARD_CONFORMING_STRINGS TO ON;
BEGIN;
CREATE TABLE "public"."AllQuebecSpecies" (gid serial PRIMARY KEY,
"family" varchar(50),
"species" varchar(50));
SELECT AddGeometryColumn('public','AllQuebecSpecies','the_geom','-1"
Failed in pgui_exec(): ERROR:  function addgeometrycolumn(unknown, unknown,
unknown, unknown, unknown, integer) does not exist
LINE 7: SELECT AddGeometryColumn('public','AllQuebecSpecies','the_ge...
               ^
HINT:  No function matches the given name and argument types. You might
need to add explicit type casts.

Shapefile import failed.

Also I am new to PostGIS and Postgres so this might sound very dumb
question but if I create a new database in pgadmin3, is it postgres
database or postgis db? If it is postgres db then probably that is why
shape file is not able to be imported since it can only be imported into
PostGIS db (i think). So how can i convert a Postgres db to PostGIS?

-- 
Thanks & Regards
Smaran Harihar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120517/7d319df0/attachment.html>


More information about the postgis-users mailing list