From: | Matheus de Oliveira <matioli(dot)matheus(at)gmail(dot)com> |
---|---|
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-21 14:49:08 |
Message-ID: | CAJghg4+gacf_hVHjFsie1RaBwoJ4iguqZNh5o0uUpdE2du4C-A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Thu, Sep 18, 2014 at 4:59 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:
> On 9/18/2014 12:47 PM, stagirus wrote:
>
>> Does anybody know of a solution on how to designate a schema while
>> establishing the connection? I would highly appreciate it!!!
>>
>>
>
> we use the rolename as the default schema. works for us.
If someone has this requirement, it *probably* uses different users for
different schema configurations. In such case you don't even need to match
user name and schema name, you can simple configure search_path per user as:
ALTER ROLE username SET search_path TO schema1, schema2, ...;
For me, setting search_path from URL connection is a mistake, as it is not
one of configurations accept on connection creating at the protocol (or is
it?), like it is for client_encoding, application_name and others. If JDBC
devs are going to change settings on URL then you probably should start
thinking on more generic, like setting any GUC (like work_mem, etc.).
Disclaimer: I'm not a JDBC community active user, that is my "opinion", and
you can take or not... ;-)
Regards,
--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres
From | Date | Subject | |
---|---|---|---|
Next Message | cowwoc | 2014-09-21 17:38:13 | Re: Patch to allow setting schema/search_path in the connectionURL |
Previous Message | Craig Ringer | 2014-09-21 07:35:31 | Re: Disk buffering of resultsets |