[gdal-dev] postgis: strange behavior when 'public' schema does not exist

Chaitanya kumar CH chaitanya.ch at gmail.com
Thu Apr 12 02:26:04 EDT 2012


Martijn,

Thanks for the excellent error report.
I couldn't find any statement for or against the requirement for the public
schema. Can you provide a reference to this?

On Thu, Apr 12, 2012 at 10:43 AM, Martijn van Exel <m at rtijn.org> wrote:

> 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 at 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 at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120412/9e8f17cf/attachment.html


More information about the gdal-dev mailing list