From: | Maciek Sakrejda <msakrejda(at)truviso(dot)com> |
---|---|
To: | Sven Hafner <sven(dot)hafner(at)gmx(dot)de> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Is there a schema parameter for the jdbc URL ? |
Date: | 2010-01-30 10:23:59 |
Message-ID: | 895e58dd1001300223g726914fdtd76df34873e2f43a@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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 <sven(dot)hafner(at)gmx(dot)de> 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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
From | Date | Subject | |
---|---|---|---|
Next Message | Sven Hafner | 2010-01-30 13:35:20 | Re: Is there a schema parameter for the jdbc URL ? |
Previous Message | Sven Hafner | 2010-01-30 02:40:37 | Is there a schema parameter for the jdbc URL ? |