Quantcast

Patch to allow setting schema/search_path in the connectionURL

classic Classic list List threaded Threaded
41 messages Options
123
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Patch to allow setting schema/search_path in the connectionURL

Scott Langley-3
Many years ago, Andreas Joseph Krogh submitted a patch to allow the
setting of the default schema in a JDBC connection string:

   http://archives.postgresql.org/pgsql-jdbc/2002-12/msg00187.php

It was rejected with some objections:
   http://archives.postgresql.org/pgsql-jdbc/2002-12/msg00189.php

I've made a modern version of this patch against the current CVS head
that hopefully addresses the earlier objections on this list.  In this
version, however, the parameter is called 'searchpath' instead of 'schema'

I find this functionality useful for a data reporting tool like BIRT:
   http://www.eclipse.org/birt/phoenix/
that expects you to provide the JDBC connection parameters but where the
  tool will build appropriate SQL queries for report generation - based
on your manipulation of the report designer interface.  Our DBA likes to
use postgresql schemas for namespace  management. Setting a searchpath
keyword in the JDBC connection parameters allows the BIRT reports to be
easily portable for use with differently-named schemas.

E.g.:

        jdbc:postgresql://localhost:5432/mydatabase?searchpath=myschema

Incidentally, I noticed that the npgsql developers added similar
functionality to their Posgresql driver in November of last year:

   http://archives.postgresql.org/pgsql-committers/2007-11/msg00506.php

Regards,

Scott Langley
--
Systems Analyst/Programmer
Statistical Center for HIV/AIDS Research and Prevention (SCHARP)
Fred Hutchinson Cancer Research Center
Seattle, Washington
[hidden email]


--- pgjdbc/doc/pgjdbc.xml Sun Apr 13 09:03:49 2008
+++ pgjdbc_searchpath/doc/pgjdbc.xml Tue Jul  8 11:13:02 2008
@@ -525,6 +525,18 @@
       </varlistentry>
 
       <varlistentry>
+       <term><varname>searchpath</varname> = <type>String</type></term>
+       <listitem>
+        <para>
+ Set a custom search path for this connection.  The first schema in the path will be
+ used for any tables or other named objects that are created when no target schema
+ is specified in a command. This is only useful in the situation where it cannot be
+ handled by the per user or per database defaults.
+        </para>
+       </listitem>
+      </varlistentry>
+      
+      <varlistentry>
        <term><varname>allowEncodingChanges</varname> = <type>boolean</type></term>
        <listitem>
         <para>
--- pgjdbc/org/postgresql/Driver.java.in Sun Apr 13 09:03:49 2008
+++ pgjdbc_searchpath/org/postgresql/Driver.java.in Tue Jul  8 10:00:56 2008
@@ -180,6 +180,8 @@
      *  server then the character set of the database is used as the default,
      *  otherwise the jvm character encoding is used as the default.
      *   This value is only used when connecting to a 7.2 or older server.
+     * searchpath - (optional) Set a custom search path. Useful if you want to
+     *  query a non-default schema but don't wish to modify your queries.
      * loglevel - (optional) Enable logging of messages from the driver.
      *  The value is an integer from 1 to 2 where:
      *    INFO = 1, DEBUG = 2
@@ -447,6 +449,8 @@
                 { "stringtype", Boolean.FALSE,
                   "The type to bind String parameters as (usually 'varchar'; 'unspecified' allows implicit casting to other types)",
                   new String[] { "varchar", "unspecified" } },
+                { "searchpath", Boolean.FALSE,
+                  "Set a custom search path." },
             };
 
     /**
--- pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Connection.java Mon Apr 14 21:23:57 2008
+++ pgjdbc_searchpath/org/postgresql/jdbc2/AbstractJdbc2Connection.java Tue Jul  8 13:13:40 2008
@@ -160,6 +160,13 @@
         _typeCache = createTypeInfo(this);
         initObjectTypes(info);
 
+        // Set Custom Search Path
+        String searchpath = info.getProperty("searchpath");
+        if((searchpath != null) && (!(searchpath.trim().isEmpty()))){
+         String set_cmd = "SET search_path TO " + searchpath + "; show search_path";
+         execSQLQuery(set_cmd);
+        }
+        
         if (Boolean.valueOf(info.getProperty("logUnclosedConnections")).booleanValue()) {
             openStackTrace = new Throwable("Connection was created at this point:");
             enableDriverManagerLogging();


--
Sent via pgsql-jdbc mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

Heikki Linnakangas-2
Scott Langley wrote:

> Many years ago, Andreas Joseph Krogh submitted a patch to allow the
> setting of the default schema in a JDBC connection string:
>
>   http://archives.postgresql.org/pgsql-jdbc/2002-12/msg00187.php
>
> It was rejected with some objections:
>   http://archives.postgresql.org/pgsql-jdbc/2002-12/msg00189.php
>
> I've made a modern version of this patch against the current CVS head
> that hopefully addresses the earlier objections on this list.  In this
> version, however, the parameter is called 'searchpath' instead of 'schema'

I think it would be more useful to provide a way to set any GUC variable
in the connection string, not just search_path.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

--
Sent via pgsql-jdbc mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

Kris Jurka


On Wed, 9 Jul 2008, Heikki Linnakangas wrote:

> I think it would be more useful to provide a way to set any GUC variable in
> the connection string, not just search_path.
>

In previous discussions:

http://archives.postgresql.org/pgsql-jdbc/2004-02/thrd2.php#00022

One significant roadblock was how to handle the Datasource implementation
which needs to know all the available GUC parameters at compile time:

http://archives.postgresql.org/pgsql-jdbc/2004-02/msg00037.php

I'm not particularly excited about enumerating them all and the suggested
alternative methods of passing these values in Properties, String[][]
don't seem terribly appealing

Kris Jurka

--
Sent via pgsql-jdbc mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

cowwoc
Hi,

Did this patch ever make it in? Is there a way to specify the default schema before establishing a connection?

Thanks,
Gili

Kris Jurka wrote
On Wed, 9 Jul 2008, Heikki Linnakangas wrote:

> I think it would be more useful to provide a way to set any GUC variable in
> the connection string, not just search_path.
>

In previous discussions:

http://archives.postgresql.org/pgsql-jdbc/2004-02/thrd2.php#00022

One significant roadblock was how to handle the Datasource implementation
which needs to know all the available GUC parameters at compile time:

http://archives.postgresql.org/pgsql-jdbc/2004-02/msg00037.php

I'm not particularly excited about enumerating them all and the suggested
alternative methods of passing these values in Properties, String[][]
don't seem terribly appealing

Kris Jurka

--
Sent via pgsql-jdbc mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

Dave Cramer-8
I don't think it did, I'm not opposed to this. I think there may even be an outstanding pull request for it.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On 17 September 2014 14:04, cowwoc <[hidden email]> wrote:
Hi,

Did this patch ever make it in? Is there a way to specify the default schema
before establishing a connection?

Thanks,
Gili


Kris Jurka wrote
> On Wed, 9 Jul 2008, Heikki Linnakangas wrote:
>
>> I think it would be more useful to provide a way to set any GUC variable
>> in
>> the connection string, not just search_path.
>>
>
> In previous discussions:
>
> http://archives.postgresql.org/pgsql-jdbc/2004-02/thrd2.php#00022
>
> One significant roadblock was how to handle the Datasource implementation
> which needs to know all the available GUC parameters at compile time:
>
> http://archives.postgresql.org/pgsql-jdbc/2004-02/msg00037.php
>
> I'm not particularly excited about enumerating them all and the suggested
> alternative methods of passing these values in Properties, String[][]
> don't seem terribly appealing
>
> Kris Jurka
>
> --
> Sent via pgsql-jdbc mailing list (

> pgsql-jdbc@

> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc





--
View this message in context: http://postgresql.1045698.n5.nabble.com/Patch-to-allow-setting-schema-search-path-in-the-connectionURL-tp2174512p5819366.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

stagirus
I too have a similar requirement to specify the schema.

I see in various discussions that many people have tried to fix this problem. It appears there is no resolution yet. It is sad that the JDBC driver community does not seem to pay any attention to the end-user needs. Hello.. PLEASE WAKE UP! We are in a different era!

Does anybody know of a solution on how to designate a schema while establishing the connection? I would highly appreciate it!!!
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

John R Pierce
On 9/18/2014 12:47 PM, stagirus wrote:
> Does anybody know of a solution on how to designate a schema while
> establishing the connection? I would highly appreciate it!!!
>  

we use the rolename as the default schema.   works for us.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



--
Sent via pgsql-jdbc mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

cowwoc
In reply to this post by stagirus
I added a hook that runs immediately before acquiring a Connection. It
sets the schema using an SQL update command, and forwards the connection
on to the rest of the application. Not ideal but it works.

Gili

On 18/09/2014 3:47 PM, stagirus [via PostgreSQL] wrote:
> I too have a similar requirement to specify the schema.
>
> I see in various discussions that many people have tried to fix this
> problem. It appears there is no resolution yet. It is sad that the
> JDBC driver community does not seem to pay any attention to the
> end-user needs. Hello.. PLEASE WAKE UP! We are in a different era!
>
> Does anybody know of a solution on how to designate a schema while
> establishing the connection? I would highly appreciate it!!!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

Dave Cramer-8
In reply to this post by stagirus
What era is this exactly ? 3 people are looking for this particular feature. This is not part of the JDBC spec. Perhaps if it is that important someone can provide some code to implement this ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On 18 September 2014 15:47, stagirus <[hidden email]> wrote:
I too have a similar requirement to specify the schema.

I see in various discussions that many people have tried to fix this
problem. It appears there is no resolution yet. It is sad that the JDBC
driver community does not seem to pay any attention to the end-user needs.
Hello.. PLEASE WAKE UP! We are in a different era!

Does anybody know of a solution on how to designate a schema while
establishing the connection? I would highly appreciate it!!!




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Patch-to-allow-setting-schema-search-path-in-the-connectionURL-tp2174512p5819543.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

Alexis Meneses
Hi,

This feature is already available as it has been implemented and merged earlier in the year using a property named "currentSchema" of the JDBC URL.

It's currenly only available in the master branch though.

btw, the related issue #155 can be closed now.

Alexis Meneses

2014-09-18 22:17 GMT+02:00 Dave Cramer <[hidden email]>:
What era is this exactly ? 3 people are looking for this particular feature. This is not part of the JDBC spec. Perhaps if it is that important someone can provide some code to implement this ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On 18 September 2014 15:47, stagirus <[hidden email]> wrote:
I too have a similar requirement to specify the schema.

I see in various discussions that many people have tried to fix this
problem. It appears there is no resolution yet. It is sad that the JDBC
driver community does not seem to pay any attention to the end-user needs.
Hello.. PLEASE WAKE UP! We are in a different era!

Does anybody know of a solution on how to designate a schema while
establishing the connection? I would highly appreciate it!!!




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Patch-to-allow-setting-schema-search-path-in-the-connectionURL-tp2174512p5819543.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


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


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

cowwoc
Alexis,

Is there an issue keeping track of the fact the documentation needs to be updated?

Thanks,
Gili

On 19/09/2014 11:10 AM, Alexis Meneses [via PostgreSQL] wrote:
Hi,

This feature is already available as it has been implemented and merged earlier in the year using a property named "currentSchema" of the JDBC URL.

It's currenly only available in the master branch though.

btw, the related issue #155 can be closed now.

Alexis Meneses

2014-09-18 22:17 GMT+02:00 Dave Cramer <[hidden email]>:
What era is this exactly ? 3 people are looking for this particular feature. This is not part of the JDBC spec. Perhaps if it is that important someone can provide some code to implement this ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On 18 September 2014 15:47, stagirus <[hidden email]> wrote:
I too have a similar requirement to specify the schema.

I see in various discussions that many people have tried to fix this
problem. It appears there is no resolution yet. It is sad that the JDBC
driver community does not seem to pay any attention to the end-user needs.
Hello.. PLEASE WAKE UP! We are in a different era!

Does anybody know of a solution on how to designate a schema while
establishing the connection? I would highly appreciate it!!!




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Patch-to-allow-setting-schema-search-path-in-the-connectionURL-tp2174512p5819543.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


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





To unsubscribe from Patch to allow setting schema/search_path in the connectionURL, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

Alexis Meneses
The docbook is up-to-date regarding this connection parameter. It's also reflected by the internal getPropertyInfo. Do you think about something else?

Alexis Meneses

2014-09-19 18:55 GMT+02:00 cowwoc <[hidden email]>:
Alexis,

Is there an issue keeping track of the fact the documentation needs to be updated?

Thanks,
Gili

On 19/09/2014 11:10 AM, Alexis Meneses [via PostgreSQL] wrote:
Hi,

This feature is already available as it has been implemented and merged earlier in the year using a property named "currentSchema" of the JDBC URL.

It's currenly only available in the master branch though.

btw, the related issue #155 can be closed now.

Alexis Meneses

2014-09-18 22:17 GMT+02:00 Dave Cramer <[hidden email]>:
What era is this exactly ? 3 people are looking for this particular feature. This is not part of the JDBC spec. Perhaps if it is that important someone can provide some code to implement this ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On 18 September 2014 15:47, stagirus <[hidden email]> wrote:
I too have a similar requirement to specify the schema.

I see in various discussions that many people have tried to fix this
problem. It appears there is no resolution yet. It is sad that the JDBC
driver community does not seem to pay any attention to the end-user needs.
Hello.. PLEASE WAKE UP! We are in a different era!

Does anybody know of a solution on how to designate a schema while
establishing the connection? I would highly appreciate it!!!




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Patch-to-allow-setting-schema-search-path-in-the-connectionURL-tp2174512p5819543.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


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





To unsubscribe from Patch to allow setting schema/search_path in the connectionURL, click here.
NAML



View this message in context: Re: Patch to allow setting schema/search_path in the connectionURL
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

cowwoc
I am expecting to see it here: http://jdbc.postgresql.org/documentation/head/connect.html

Gili

On 20/09/2014 3:48 AM, Alexis Meneses wrote:
The docbook is up-to-date regarding this connection parameter. It's also reflected by the internal getPropertyInfo. Do you think about something else?

Alexis Meneses

2014-09-19 18:55 GMT+02:00 cowwoc <[hidden email]>:
Alexis,

Is there an issue keeping track of the fact the documentation needs to be updated?

Thanks,
Gili

On 19/09/2014 11:10 AM, Alexis Meneses [via PostgreSQL] wrote:
Hi,

This feature is already available as it has been implemented and merged earlier in the year using a property named "currentSchema" of the JDBC URL.

It's currenly only available in the master branch though.

btw, the related issue #155 can be closed now.

Alexis Meneses

2014-09-18 22:17 GMT+02:00 Dave Cramer <[hidden email]>:
What era is this exactly ? 3 people are looking for this particular feature. This is not part of the JDBC spec. Perhaps if it is that important someone can provide some code to implement this ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On 18 September 2014 15:47, stagirus <[hidden email]> wrote:
I too have a similar requirement to specify the schema.

I see in various discussions that many people have tried to fix this
problem. It appears there is no resolution yet. It is sad that the JDBC
driver community does not seem to pay any attention to the end-user needs.
Hello.. PLEASE WAKE UP! We are in a different era!

Does anybody know of a solution on how to designate a schema while
establishing the connection? I would highly appreciate it!!!




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Patch-to-allow-setting-schema-search-path-in-the-connectionURL-tp2174512p5819543.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


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





To unsubscribe from Patch to allow setting schema/search_path in the connectionURL, click here.
NAML



View this message in context: Re: Patch to allow setting schema/search_path in the connectionURL
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

Matheus de Oliveira
In reply to this post by John R Pierce

On Thu, Sep 18, 2014 at 4:59 PM, John R Pierce <[hidden email]> wrote:
On 9/18/2014 12:47 PM, stagirus wrote:
Does anybody know of a solution on how to designate a schema while
establishing the connection? I would highly appreciate it!!!
 

we use the rolename as the default schema.   works for us.

If someone has this requirement, it *probably* uses different users for different schema configurations. In such case you don't even need to match user name and schema name, you can simple configure search_path per user as:

    ALTER ROLE username SET search_path TO schema1, schema2, ...;

For me, setting search_path from URL connection is a mistake, as it is not one of configurations accept on connection creating at the protocol (or is it?), like it is for client_encoding, application_name and others. If JDBC devs are going to change settings on URL then you probably should start thinking on more generic, like setting any GUC (like work_mem, etc.).

Disclaimer: I'm not a JDBC community active user, that is my "opinion", and you can take or not... ;-)

Regards,
--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

cowwoc

I actually want the same user across all schemas (unit tests where each test runs against a different schema in order to isolate the tests from each other).

Can someone please confirm whether set search_path can be set on a per connection basis?

Thanks,
Gili

On Sep 21, 2014 10:50 AM, "Matheus de Oliveira [via PostgreSQL]" <[hidden email]> wrote:

On Thu, Sep 18, 2014 at 4:59 PM, John R Pierce <[hidden email]> wrote:
On 9/18/2014 12:47 PM, stagirus wrote:
Does anybody know of a solution on how to designate a schema while
establishing the connection? I would highly appreciate it!!!
 

we use the rolename as the default schema.   works for us.

If someone has this requirement, it *probably* uses different users for different schema configurations. In such case you don't even need to match user name and schema name, you can simple configure search_path per user as:

    ALTER ROLE username SET search_path TO schema1, schema2, ...;

For me, setting search_path from URL connection is a mistake, as it is not one of configurations accept on connection creating at the protocol (or is it?), like it is for client_encoding, application_name and others. If JDBC devs are going to change settings on URL then you probably should start thinking on more generic, like setting any GUC (like work_mem, etc.).

Disclaimer: I'm not a JDBC community active user, that is my "opinion", and you can take or not... ;-)

Regards,
--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres




To unsubscribe from Patch to allow setting schema/search_path in the connectionURL, click here.
NAML
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

Dave Cramer-4

Yes it will work

On Sep 21, 2014 1:39 PM, "cowwoc" <[hidden email]> wrote:

I actually want the same user across all schemas (unit tests where each test runs against a different schema in order to isolate the tests from each other).

Can someone please confirm whether set search_path can be set on a per connection basis?

Thanks,
Gili

On Sep 21, 2014 10:50 AM, "Matheus de Oliveira [via PostgreSQL]" <[hidden email]> wrote:

On Thu, Sep 18, 2014 at 4:59 PM, John R Pierce <[hidden email]> wrote:
On 9/18/2014 12:47 PM, stagirus wrote:
Does anybody know of a solution on how to designate a schema while
establishing the connection? I would highly appreciate it!!!
 

we use the rolename as the default schema.   works for us.

If someone has this requirement, it *probably* uses different users for different schema configurations. In such case you don't even need to match user name and schema name, you can simple configure search_path per user as:

    ALTER ROLE username SET search_path TO schema1, schema2, ...;

For me, setting search_path from URL connection is a mistake, as it is not one of configurations accept on connection creating at the protocol (or is it?), like it is for client_encoding, application_name and others. If JDBC devs are going to change settings on URL then you probably should start thinking on more generic, like setting any GUC (like work_mem, etc.).

Disclaimer: I'm not a JDBC community active user, that is my "opinion", and you can take or not... ;-)

Regards,
--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres




To unsubscribe from Patch to allow setting schema/search_path in the connectionURL, click here.
NAML


View this message in context: Re: Patch to allow setting schema/search_path in the connectionURL
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

Alexis Meneses
In reply to this post by cowwoc
Gili,

It should appear in the page you're linking either when the 9.4 is released or if the feature is backported in 9.3 branch.

Alexis Meneses

2014-09-20 22:27 GMT+02:00 Gili <[hidden email]>:
I am expecting to see it here: http://jdbc.postgresql.org/documentation/head/connect.html

Gili


On 20/09/2014 3:48 AM, Alexis Meneses wrote:
The docbook is up-to-date regarding this connection parameter. It's also reflected by the internal getPropertyInfo. Do you think about something else?

Alexis Meneses

2014-09-19 18:55 GMT+02:00 cowwoc <[hidden email]>:
Alexis,

Is there an issue keeping track of the fact the documentation needs to be updated?

Thanks,
Gili

On 19/09/2014 11:10 AM, Alexis Meneses [via PostgreSQL] wrote:
Hi,

This feature is already available as it has been implemented and merged earlier in the year using a property named "currentSchema" of the JDBC URL.

It's currenly only available in the master branch though.

btw, the related issue #155 can be closed now.

Alexis Meneses

2014-09-18 22:17 GMT+02:00 Dave Cramer <[hidden email]>:
What era is this exactly ? 3 people are looking for this particular feature. This is not part of the JDBC spec. Perhaps if it is that important someone can provide some code to implement this ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On 18 September 2014 15:47, stagirus <[hidden email]> wrote:
I too have a similar requirement to specify the schema.

I see in various discussions that many people have tried to fix this
problem. It appears there is no resolution yet. It is sad that the JDBC
driver community does not seem to pay any attention to the end-user needs.
Hello.. PLEASE WAKE UP! We are in a different era!

Does anybody know of a solution on how to designate a schema while
establishing the connection? I would highly appreciate it!!!




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Patch-to-allow-setting-schema-search-path-in-the-connectionURL-tp2174512p5819543.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


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





To unsubscribe from Patch to allow setting schema/search_path in the connectionURL, click here.
NAML



View this message in context: Re: Patch to allow setting schema/search_path in the connectionURL
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

stagirus
In reply to this post by cowwoc
I just tried as follows:
ALTER ROLE dev SET search_path TO bep;

Then ran a bunch of SQL commands after connecting to the user dev. But it fails because it is looking for the "public" schema. I am not sure how this "ALTER ROLE" works.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

stagirus
In reply to this post by cowwoc
I am highly interested in exploring currentSchema property in the JDBC URL string.

Can someone point me how/where to obtain the jar file with that change? I really appreciate it.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch to allow setting schema/search_path in the connectionURL

John R Pierce
In reply to this post by stagirus
On 9/22/2014 9:53 PM, stagirus wrote:
> I just tried as follows:
> ALTER ROLE dev SET search_path TO bep;
>
> Then ran a bunch of SQL commands after connecting to the user dev. But it
> fails because it is looking for the "public" schema. I am not sure how this
> "ALTER ROLE" works.

ALTER ROLE dev SET search_path TO bep,public;




--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



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

123
Loading...