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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Patch to allow setting schema/search_path in the connectionURL
Дата
Msg-id 6315.1411449391@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Patch to allow setting schema/search_path in the connectionURL  (John R Pierce <pierce@hogranch.com>)
Список 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 по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Patch to allow setting schema/search_path in the connectionURL
Следующее
От: stagirus
Дата:
Сообщение: Re: Patch to allow setting schema/search_path in the connectionURL