Hi all,

I had trouble extracting a shape file from a PostGIS table using ogr2ogr
(1.9.0 on Ubuntu 10.04 64 bit). Debug output from ogr2ogr:

mvexel@lima:/osm/tmp/candidates$ ogr2ogr -overwrite -f "ESRI Shapefile"
--debug on candidates PG:"dbname=osmus active_schema=us user=osm
password=osm" candidates
PG: DBName="osmus"
ERROR 1: ERROR:  invalid value for parameter "search_path": "us, public"
DETAIL:  schema "public" does not exist

FAILURE:
Unable to open datasource `PG:dbname=osmus active_schema=us user=osm
password=osm' with the following drivers.

What I think happens is that ogr implies that schema public exists (which
is not a requirement for PostgreSQL) and appends that to the schemas list
to feed to search_path. SET search_path then fails, and the active_schema
is not set. Consequently, the table is not found and ogr2ogr is not able to
connect.

Adding a 'public' schema to the database remedied the situation.

Is this a bug? Do you need more information?

Best,
-- 
martijn van exel
geospatial omnivore
1109 1st ave #2
salt lake city, ut 84103
801-550-5815
http://oegeo.wordpress.com
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to