Hi all,<br><br>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:<br><br>mvexel@lima:/osm/tmp/candidates$ ogr2ogr -overwrite -f "ESRI Shapefile" --debug on candidates PG:"dbname=osmus active_schema=us user=osm password=osm" candidates<br>
PG: DBName="osmus"<br>ERROR 1: ERROR: invalid value for parameter "search_path": "us, public"<br>DETAIL: schema "public" does not exist<br><br>FAILURE:<br>Unable to open datasource `PG:dbname=osmus active_schema=us user=osm password=osm' with the following drivers.<br>
<br clear="all">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. <br>
<br>Adding a 'public' schema to the database remedied the situation.<br><br>Is this a bug? Do you need more information?<br><br>Best,<br>-- <br>martijn van exel<br>geospatial omnivore<br>1109 1st ave #2<br>salt lake city, ut 84103<br>
801-550-5815<br><a href="http://oegeo.wordpress.com" target="_blank">http://oegeo.wordpress.com</a><br>