Re: Patch to allow setting schema/search_path in the connectionURL - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Patch to allow setting schema/search_path in the connectionURL
Date
Msg-id 6315.1411449391@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch to allow setting schema/search_path in the connectionURL  (John R Pierce <pierce@hogranch.com>)
List pgsql-jdbc
John R Pierce <pierce@hogranch.com> writes:
> On 9/22/2014 10:02 PM, stagirus wrote:
>> I thought the following context might be helpful. We have been using Oracle.
>> It conveniently and transparently relates a user to a schema.

> postgres' default search_path is $USER,public...  so if there's a schema
> the same name as the user role, then it will look for objects there
> before it looks in public... which as far as I can tell is exactly what
> you're saying Oracle does.

Quite.  You do have to create a schema having the same name as the user
(and owned by that user), but if you do that then you should get similar
behavior with the default search path.

There is some documentation about this in the fine manual; see
http://www.postgresql.org/docs/9.3/static/ddl-schemas.html
particularly the last two sections on that page.

            regards, tom lane


pgsql-jdbc by date:

Previous
From: John R Pierce
Date:
Subject: Re: Patch to allow setting schema/search_path in the connectionURL
Next
From: stagirus
Date:
Subject: Re: Patch to allow setting schema/search_path in the connectionURL