[Gdal-dev] Re: OGR PostgreSQL and schema

Charlie Savage cfis at interserv.com
Tue Oct 18 18:29:57 EDT 2005


Yes and no.  You don't "connect" to a schema - you connect to a 
database.  You then reference tables in a schema like this: 
"schema.table" - however, OGR does not support this.

As can work around this by setting the postgresql search_path to include 
your schema.  You have to do it for the user, as opposed to a session, 
since OGR will create its own connection. So:

ALTER USER <user_name> SET search_path TO <schema_name>,"$user",public;

If you have the same table name in different schemas, with different 
fields, then you'll have to exclude the other tables by setting the 
search_path appropriately.

Thanks,

Charlie


Tamas Szekeres wrote:
> Hi list,
> 
> Is it possible to create or connect to PostrgreSQL data existing in a schema
> other than public?
> 
> 
> Tamas Szekeres
> 





More information about the Gdal-dev mailing list