pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
please help - schema in jdbc connection string
6+ messages / 5 participants
[nested] [flat]

* please help - schema in jdbc connection string
@ 2004-09-08 00:50  Nanu Ram <nanu@icrossing.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Nanu Ram @ 2004-09-08 00:50 UTC (permalink / raw)
  To: pgsql-jdbc

Hi:

 

I am sorry of this was already answered earlier (I looked - it was
asked, but didn't find the ans.). Has this been implemented?

I would like to connect to one of the schema's in my database, something
likes this ...

 

jdbc:postgresql://<host>:5432/<db>?schema=<schema1>

 

I am on 7.4.3

- Nanu

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: please help - schema in jdbc connection string
@ 2004-09-08 08:51  Paul Thomas <paul@tmsl.demon.co.uk>
  parent: Nanu Ram <nanu@icrossing.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Paul Thomas @ 2004-09-08 08:51 UTC (permalink / raw)
  To: pgsql-jdbc


On 08/09/2004 01:50 Nanu Ram wrote:
> Hi:
> 
> 
> 
> I am sorry of this was already answered earlier (I looked - it was
> asked, but didn't find the ans.). Has this been implemented?
> 
> I would like to connect to one of the schema's in my database, something
> likes this ...
> 
> 
> 
> jdbc:postgresql://<host>:5432/<db>?schema=<schema1>
> 
> 
> 
> I am on 7.4.3


You don't connect to schemas, you connect to databases. 
-- 
Paul Thomas
+------------------------------+-------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for Business           |
| Computer Consultants         | http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+-------------------------------------------+



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: please help - schema in jdbc connection string
@ 2004-09-08 09:29  Andreas Joseph Krogh <andreak@officenet.no>
  parent: Paul Thomas <paul@tmsl.demon.co.uk>
  0 siblings, 1 reply; 6+ messages in thread

From: Andreas Joseph Krogh @ 2004-09-08 09:29 UTC (permalink / raw)
  To: Paul Thomas <paul@tmsl.demon.co.uk>; +Cc: pgsql-jdbc

On Wednesday 08 September 2004 10:51, Paul Thomas wrote:
> On 08/09/2004 01:50 Nanu Ram wrote:
> > Hi:
> >
> >
> >
> > I am sorry of this was already answered earlier (I looked - it was
> > asked, but didn't find the ans.). Has this been implemented?
> >
> > I would like to connect to one of the schema's in my database, something
> > likes this ...
> >
> >
> >
> > jdbc:postgresql://<host>:5432/<db>?schema=<schema1>
> >
> >
> >
> > I am on 7.4.3
>
> You don't connect to schemas, you connect to databases.

I don't think that's the answer hi's looking for. What he needs is setting the 
default search_path to <schema> before he can operate on the db, and he 
doesn't want to do it programmaticly(which I understand why). I think this is 
perfectly valid and makes sence. I made a patch to the JDBC driver to allow 
this some time ago, but it was rejected(lack of docs I think). Let me know if 
it's of interest.

-- 
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / Manager
gpg public_key: http://dev.officenet.no/~andreak/public_key.asc
------------------------+---------------------------------------------+
OfficeNet AS            | Two tomatoes in a fridge. One tomato says   |
Hoffsveien 17           | to the other, "It's cold in here, isn't it?"|
PO. Box 425 Skøyen      | The other tomato says, "F**king hell,       |
0213 Oslo               | a talking tomato!"                          |
NORWAY                  |                                             |
Phone : +47 22 13 01 00 |                                             |
Direct: +47 22 13 10 03 |                                             |
Mobile: +47 909  56 963 |                                             |
------------------------+---------------------------------------------+

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: please help - schema in jdbc connection string
@ 2004-09-08 14:02  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Andreas Joseph Krogh <andreak@officenet.no>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2004-09-08 14:02 UTC (permalink / raw)
  To: Andreas Joseph Krogh <andreak@officenet.no>; +Cc: Paul Thomas <paul@tmsl.demon.co.uk>; pgsql-jdbc

Andreas Joseph Krogh <andreak@officenet.no> writes:
> I don't think that's the answer hi's looking for. What he needs is setting =
> the=20
> default search_path to <schema> before he can operate on the db, and he=20
> doesn't want to do it programmaticly(which I understand why).

Possibly it would work to set his desired search path as a per-user
option (see ALTER USER).

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: please help - schema in jdbc connection string
@ 2004-09-08 15:18  Nanu Ram <nanu@icrossing.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Nanu Ram @ 2004-09-08 15:18 UTC (permalink / raw)
  To: Andreas Joseph Krogh <andreak@officenet.no>; Paul Thomas <paul@tmsl.demon.co.uk>; +Cc: pgsql-jdbc

I can definitely make use of this - or some other way to achieve this - I don't want to be required to specify the schema in each of my sql statements.

I heard someone say you can do it with the search path env. var. Can someone give an eg. of this in conjunction with a java code snippet?

Thanks

NANU RAMAMRUTHAM / DIRECTOR, PRODUCT DEVELOPMENT /
nanu@icrossing.com

/direct/ 480.505.5810
/main/ 480.505.5800 
/fax/ 480.505.5814

icrossing, inc.
icrossing.com | new york | scottsdale


-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Andreas Joseph Krogh
Sent: Wednesday, September 08, 2004 2:30 AM
To: Paul Thomas
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] please help - schema in jdbc connection string

On Wednesday 08 September 2004 10:51, Paul Thomas wrote:
> On 08/09/2004 01:50 Nanu Ram wrote:
> > Hi:
> >
> >
> >
> > I am sorry of this was already answered earlier (I looked - it was
> > asked, but didn't find the ans.). Has this been implemented?
> >
> > I would like to connect to one of the schema's in my database, something
> > likes this ...
> >
> >
> >
> > jdbc:postgresql://<host>:5432/<db>?schema=<schema1>
> >
> >
> >
> > I am on 7.4.3
>
> You don't connect to schemas, you connect to databases.

I don't think that's the answer hi's looking for. What he needs is setting the 
default search_path to <schema> before he can operate on the db, and he 
doesn't want to do it programmaticly(which I understand why). I think this is 
perfectly valid and makes sence. I made a patch to the JDBC driver to allow 
this some time ago, but it was rejected(lack of docs I think). Let me know if 
it's of interest.

-- 
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / Manager
gpg public_key: http://dev.officenet.no/~andreak/public_key.asc
------------------------+---------------------------------------------+
OfficeNet AS            | Two tomatoes in a fridge. One tomato says   |
Hoffsveien 17           | to the other, "It's cold in here, isn't it?"|
PO. Box 425 Skøyen      | The other tomato says, "F**king hell,       |
0213 Oslo               | a talking tomato!"                          |
NORWAY                  |                                             |
Phone : +47 22 13 01 00 |                                             |
Direct: +47 22 13 10 03 |                                             |
Mobile: +47 909  56 963 |                                             |
------------------------+---------------------------------------------+




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: please help - schema in jdbc connection string
@ 2004-09-09 04:09  Antony Paul <antonypaul24@hotmail.com>
  parent: Nanu Ram <nanu@icrossing.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Antony Paul @ 2004-09-09 04:09 UTC (permalink / raw)
  To: pgsql-jdbc

http://www.postgresql.org/docs/7.3/static/ddl-schemas.html

rgds
Antony Paul

----- Original Message -----
From: "Nanu Ram" <nanu@icrossing.com>
To: "Andreas Joseph Krogh" <andreak@officenet.no>; "Paul Thomas"
<paul@tmsl.demon.co.uk>
Cc: <pgsql-jdbc@postgresql.org>
Sent: Wednesday, September 08, 2004 8:48 PM
Subject: Re: [JDBC] please help - schema in jdbc connection string


I can definitely make use of this - or some other way to achieve this - I
don't want to be required to specify the schema in each of my sql
statements.

I heard someone say you can do it with the search path env. var. Can someone
give an eg. of this in conjunction with a java code snippet?

Thanks

NANU RAMAMRUTHAM / DIRECTOR, PRODUCT DEVELOPMENT /
nanu@icrossing.com

/direct/ 480.505.5810
/main/ 480.505.5800
/fax/ 480.505.5814

icrossing, inc.
icrossing.com | new york | scottsdale


-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Andreas Joseph Krogh
Sent: Wednesday, September 08, 2004 2:30 AM
To: Paul Thomas
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] please help - schema in jdbc connection string

On Wednesday 08 September 2004 10:51, Paul Thomas wrote:
> On 08/09/2004 01:50 Nanu Ram wrote:
> > Hi:
> >
> >
> >
> > I am sorry of this was already answered earlier (I looked - it was
> > asked, but didn't find the ans.). Has this been implemented?
> >
> > I would like to connect to one of the schema's in my database, something
> > likes this ...
> >
> >
> >
> > jdbc:postgresql://<host>:5432/<db>?schema=<schema1>
> >
> >
> >
> > I am on 7.4.3
>
> You don't connect to schemas, you connect to databases.

I don't think that's the answer hi's looking for. What he needs is setting
the
default search_path to <schema> before he can operate on the db, and he
doesn't want to do it programmaticly(which I understand why). I think this
is
perfectly valid and makes sence. I made a patch to the JDBC driver to allow

this some time ago, but it was rejected(lack of docs I think). Let me know
if
it's of interest.

--
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / Manager
gpg public_key: http://dev.officenet.no/~andreak/public_key.asc
------------------------+---------------------------------------------+
OfficeNet AS            | Two tomatoes in a fridge. One tomato says   |
Hoffsveien 17           | to the other, "It's cold in here, isn't it?"|
PO. Box 425 Skøyen      | The other tomato says, "F**king hell,       |
0213 Oslo               | a talking tomato!"                          |
NORWAY                  |                                             |
Phone : +47 22 13 01 00 |                                             |
Direct: +47 22 13 10 03 |                                             |
Mobile: +47 909  56 963 |                                             |
------------------------+---------------------------------------------+


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@postgresql.org so that your
      message can get through to the mailing list cleanly



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2004-09-09 04:09 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-09-08 00:50 please help - schema in jdbc connection string Nanu Ram <nanu@icrossing.com>
2004-09-08 08:51 ` Paul Thomas <paul@tmsl.demon.co.uk>
2004-09-08 09:29   ` Andreas Joseph Krogh <andreak@officenet.no>
2004-09-08 14:02     ` Tom Lane <tgl@sss.pgh.pa.us>
2004-09-08 15:18 Re: please help - schema in jdbc connection string Nanu Ram <nanu@icrossing.com>
2004-09-09 04:09 ` Antony Paul <antonypaul24@hotmail.com>

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