Re: Patch against 7.3.1 AbstractJdbc1Connection.java to allow schema in connectionURL - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Patch against 7.3.1 AbstractJdbc1Connection.java to allow schema in connectionURL
Date
Msg-id 25543.1040575689@sss.pgh.pa.us
Whole thread Raw
In response to Patch against 7.3.1 AbstractJdbc1Connection.java to allow schema in connectionURL  (Andreas Joseph Krogh <andreak@officenet.no>)
List pgsql-jdbc
Andreas Joseph Krogh <andreak@officenet.no> writes:
> I've attached a patch which makes it possible to choose which schema to
> connect to by passing ?schema=myschema to the connectionURL like this:

Wouldn't it be better to set the preferred search path as part of your
per-user defaults?  I'm suspicious of adding such warts to client
libraries.

Some objections to the patch as posted:

1. No documentation.

2. It appears that the patch will forcibly set the search path whether
   the user asked for it or not.  This means that any installation,
   per-database, or per-user default setting will be overridden.  The
   patch's idea of the appropriate default does not even match the
   factory default ("$user,public" IIRC).

3. (Another aspect of inappropriate default behavior) If public schema
   doesn't exist, patch causes all connection attempts to fail.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: Again: Patch against 7.3.1 AbstractJdbc1Connection.java to allow schema in connectionURL
Next
From: Tom Lane
Date:
Subject: Re: Apparent bug in transaction processing in serializable mode