Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 5F0BF63240A for ; Sat, 30 Jan 2010 06:49:40 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 69110-10 for ; Sat, 30 Jan 2010 10:49:29 +0000 (UTC) X-Greylist: delayed 00:18:28.922714 by SQLgrey-1.7.6 Received: from mail-pz0-f180.google.com (mail-pz0-f180.google.com [209.85.222.180]) by mail.postgresql.org (Postfix) with ESMTP id A8481632A40 for ; Sat, 30 Jan 2010 06:49:29 -0400 (AST) Received: by pzk10 with SMTP id 10so2401307pzk.19 for ; Sat, 30 Jan 2010 02:49:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.143.27.42 with SMTP id e42mr1353700wfj.234.1264847039832; Sat, 30 Jan 2010 02:23:59 -0800 (PST) In-Reply-To: <4B639C25.5060501@gmx.de> References: <4B639C25.5060501@gmx.de> Date: Sat, 30 Jan 2010 02:23:59 -0800 Message-ID: <895e58dd1001300223g726914fdtd76df34873e2f43a@mail.gmail.com> Subject: Re: Is there a schema parameter for the jdbc URL ? From: Maciek Sakrejda To: Sven Hafner Cc: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=00504502cd6881234e047e5f26bf X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201001/82 X-Sequence-Number: 20278 --00504502cd6881234e047e5f26bf Content-Type: text/plain; charset=ISO-8859-1 There's no way to do this just in the URL. There's been patches submitted to add this[1], but there have been some objections. I don't quite understand what you are trying to do, but if you have access to the connection after it's created and before it's used, you can execute "set search_path" for the session. [1]: Most recent I found is discussed here: http://archives.postgresql.org/pgsql-jdbc/2008-07/msg00012.php --- Maciek Sakrejda | Software Engineer | Truviso 1065 E. Hillsdale Blvd., Suite 230 Foster City, CA 94404 (650) 242-3500 Main (650) 242-3501 F www.truviso.com On Fri, Jan 29, 2010 at 6:40 PM, Sven Hafner wrote: > Hi ! > > Asked the same question previously in the Glassfish forum, but I dont get > it to work. Not sure if it is a GF or postgres jdbc issue/feature. > > Can I use the schema in the jdbc URL ? > > My GF mailing-list question for reference: > I create a connection pool and connection pointing to a PostgreSQL DB. > Is there a way to point to a specific schema inside the DB (like a schema > parameter) ? I need to avoid a schema annotation inside the EJB code, so I > can point several instances of the same application (but different PU > pointing to different jndi jdbc resource) > to different schemes in the same postgres instance. > > Glassfish V3 and PostgreSQL 8.4 > postgresql-8.4-701.jdbc3.jar > > Thanks for input > Sven > > -- > Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-jdbc > --00504502cd6881234e047e5f26bf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable There's no way to do this just in the URL. There's been patches sub= mitted to add this[1], but there have been some objections. I don't qui= te understand what you are trying to do, but if you have access to the conn= ection after it's created and before it's used, you can execute &qu= ot;set search_path" for the session.

[1]: Most recent I found is discussed here: http://archives.postgresql.= org/pgsql-jdbc/2008-07/msg00012.php
---
Maciek Sakr= ejda | Software Engineer | Truviso

1065 E. Hillsdale Blvd., Suite 230
Foster City, CA 94404
(650) 24= 2-3500 Main
(650) 242-3501 F
www.t= ruviso.com


On Fri, Jan 29, 2010 at 6:40 PM, Sven Ha= fner <sven.hafne= r@gmx.de> wrote:
Hi !

Asked the same question previously in the Glassfish forum, but I dont get i= t to work. Not sure if it is a GF or postgres jdbc issue/feature.

Can I use the schema in the jdbc URL ?

My GF mailing-list question for reference:
I create a connection pool and connection pointing to a PostgreSQL DB.
Is there a way to point to a specific schema inside the DB (like a schema p= arameter) ? I need to avoid a schema annotation inside the EJB code, so I c= an point several instances of the same application (but different PU pointi= ng to different jndi jdbc resource)
to different schemes in the same postgres instance.

Glassfish V3 and PostgreSQL 8.4
postgresql-8.4-701.jdbc3.jar

Thanks for input
Sven

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

--00504502cd6881234e047e5f26bf--