pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Johnston <polobo@yahoo.com>
To: 'Julien Demoor' <jdemoor@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Search path in connection string
Date: Mon, 30 Jul 2012 20:41:17 -0400
Message-ID: <023a01cd6eb5$32a1e8a0$97e5b9e0$@yahoo.com> (raw)
In-Reply-To: <CANE6ZrC-9KDdWgFbBF7jLChbiE7PtFfn2FcGoPyTRxGOj_C9Eg@mail.gmail.com>
References: <CANE6ZrC-9KDdWgFbBF7jLChbiE7PtFfn2FcGoPyTRxGOj_C9Eg@mail.gmail.com>

From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Julien Demoor
Sent: Monday, July 30, 2012 8:56 AM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] Search path in connection string

 

There have been a number of messages on this list suggesting that the Postgres JDBC driver should support setting the search path as part of the connection string.

 

Can this be considered?

 

I have a use case where there doesn't appear to be any good alternatives: using BIRT, with multiple clients sharing a Postgres database with one schema each, one cannot just execute a SET SCHEMA statement (UPDATE pg_settings ... is not possible either) and qualifying object names is also not always possible (say, if there are stored procedures involved that use unqualified object names).

 

Besides being useful in this case and surely others, this feature makes sense: schemas can be used to offer separation of database objects very similar to that offered by having multiple databases, and the database itself is part of the connection string.

 

The patch proposed in http://postgresql.1045698.n5.nabble.com/Patch-to-allow-setting-schema-search-path-in-the-connectionU... is still applicable.

 

Regards,

Julien

 

 

You can customize the connection string to accomplish this.  You vary the “user” that is connecting and configure a search_path specific to that user.

 

ALTER ROLE custom_role SET search_path = …

 

David J.

 

view thread (8+ messages)  latest in thread

Message-ID: <023a01cd6eb5$32a1e8a0$97e5b9e0$@yahoo.com>
Permalink:  ../023a01cd6eb5$32a1e8a0$97e5b9e0$@yahoo.com/
Also on:    postgresql.org/message-id/023a01cd6eb5$32a1e8a0$97e5b9e0$@yahoo.com

 · 

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: polobo@yahoo.com, jdemoor@gmail.com
  Subject: Re: Search path in connection string
  In-Reply-To: <023a01cd6eb5$32a1e8a0$97e5b9e0$@yahoo.com>
  References: <CANE6ZrC-9KDdWgFbBF7jLChbiE7PtFfn2FcGoPyTRxGOj_C9Eg@mail.gmail.com> <023a01cd6eb5$32a1e8a0$97e5b9e0$@yahoo.com>

* 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