Patch to allow setting schema/search_path in the connectionURL

From: Scott Langley <slangley(at)scharp(dot)org>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Patch to allow setting schema/search_path in the connectionURL
Date: 2008-07-08 22:54:44
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

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

It was rejected with some objections:

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:
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.



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


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

Attachment Content-Type Size
searchpath.patch text/plain 2.7 KB


Browse pgsql-jdbc by date

  From Date Subject
Next Message Ken Johanson 2008-07-09 04:08:56 Re: Timestamp without Timezone and differing client / server tzs
Previous Message Dave Cramer 2008-07-08 10:53:53 Re: server-side prepared Statements