pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: John R Pierce <pierce@hogranch.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Patch to allow setting schema/search_path in the connectionURL
Date: Tue, 23 Sep 2014 01:16:31 -0400
Message-ID: <6315.1411449391@sss.pgh.pa.us> (raw)
In-Reply-To: <542100AD.9000701@hogranch.com>
References: <4873F034.8010301@scharp.org>
	<487478FC.5080607@enterprisedb.com>
	<Pine.BSO.4.64.0807091611590.6781@leary.csoft.net>
	<1410977074803-5819366.post@n5.nabble.com>
	<CADK3HH+MLmeJNShi7r4opYT14m_QRpc8+T=pewYHeE6gVq_bwg@mail.gmail.com>
	<1411069664209-5819543.post@n5.nabble.com>
	<CADK3HHKCrLDUQ6E4y=YBeHFr-Nq02ve=9CsnBm7NApcZ_+1SSw@mail.gmail.com>
	<CANPkoZTY_xhr_CazYXLzrZYVXrKL+_TxgQ9QYJ6ur4_=HSO+wA@mail.gmail.com>
	<541C5FE2.9070506@bbs.darktech.org>
	<1411448121224-5820023.post@n5.nabble.com>
	<1411448577700-5820026.post@n5.nabble.com>
	<542100AD.9000701@hogranch.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (41+ messages)  latest in thread

Message-ID: <6315.1411449391@sss.pgh.pa.us>
Permalink:  ../6315.1411449391@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6315.1411449391@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pierce@hogranch.com
  Subject: Re: Patch to allow setting schema/search_path in the connectionURL
  In-Reply-To: <6315.1411449391@sss.pgh.pa.us>
  References: <4873F034.8010301@scharp.org> <487478FC.5080607@enterprisedb.com> <Pine.BSO.4.64.0807091611590.6781@leary.csoft.net> <1410977074803-5819366.post@n5.nabble.com> <CADK3HH+MLmeJNShi7r4opYT14m_QRpc8+T=pewYHeE6gVq_bwg@mail.gmail.com> <1411069664209-5819543.post@n5.nabble.com> <CADK3HHKCrLDUQ6E4y=YBeHFr-Nq02ve=9CsnBm7NApcZ_+1SSw@mail.gmail.com> <CANPkoZTY_xhr_CazYXLzrZYVXrKL+_TxgQ9QYJ6ur4_=HSO+wA@mail.gmail.com> <541C5FE2.9070506@bbs.darktech.org> <1411448121224-5820023.post@n5.nabble.com> <1411448577700-5820026.post@n5.nabble.com> <542100AD.9000701@hogranch.com> <6315.1411449391@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox