Re: Patch to allow setting schema/search_path in the connectionURL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Patch to allow setting schema/search_path in the connectionURL
Date: 2014-09-23 05:16:31
Message-ID: 6315.1411449391@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

John R Pierce <pierce(at)hogranch(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message stagirus 2014-09-23 05:17:56 Re: Patch to allow setting schema/search_path in the connectionURL
Previous Message John R Pierce 2014-09-23 05:11:49 Re: Patch to allow setting schema/search_path in the connectionURL