From: Mark Lewis <mark.lewis@mir3.com>
To: David Fetter <david@fetter.org>
Cc: Jan de Visser <jdevisser@digitalfairway.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: pg_service.conf ?
Date: Tue, 21 Mar 2006 11:40:05 -0800
Message-ID: <1142970005.23722.72.camel@archimedes> (raw)
In-Reply-To: <20060321185624.GA28126@fetter.org>
References: <20060314032306.GA6901@fetter.org>
<4416E6CB.803@opencloud.com>
<441AE333.2010003@logix-tt.com>
<200603171152.24287.jdevisser@digitalfairway.com>
<20060321185624.GA28126@fetter.org>
Well, as one of the people who would be left out in the cold if newer
versions of the driver required JDK 1.5, perhaps the new 1.5
functionality could be leveraged if available, using something like the
following:
String getEnv(String name) {
try {
Method m;
m = System.class.getMethod("getEnv", new Class[]{String.class});
return (String)m.invoke(null, new Object[]{name});
}
catch(Exception ex) {
// Must not be running 1.5 or later
return null;
}
}
So looking in PG_JDBC_SERVICE_CONF and PGSYSCONFDIR would require 1.5,
although looking in the user's home dir is still possible with older
versions because you can inspect the user.dir System property.
-- Mark Lewis
On Tue, 2006-03-21 at 10:56 -0800, David Fetter wrote:
> On Fri, Mar 17, 2006 at 11:52:23AM -0500, Jan de Visser wrote:
> > On Friday 17 March 2006 11:26, Markus Schaber wrote:
> > > - System.getEnv("PG_JDBC_SERVICE_CONF")
> > > - System.getEnv("HOME") + File.separator + ".pgpass"
> > > - System.getEnv("PGSYSCONFDIR") + File.separator + "pg_service.conf"
> >
> > Which would mean tying yourself to JDK1.5
>
> What things wouldn't tie to JDK 1.5?
>
> This brings up some interesting questions:
>
> 1. What versions of JDK does the PostgreSQL JDBC project support now?
> 2. Is there a policy about how many versions back the project will
> continue to support?
> 3. If so, what is it? If not, what should it be? Support back to
> more than about three versions of anything is not even an option
> without a large and stable budget, and even then, there are
> limits.
>
> Cheers,
> D
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: mark.lewis@mir3.com, david@fetter.org, jdevisser@digitalfairway.com
Subject: Re: pg_service.conf ?
In-Reply-To: <1142970005.23722.72.camel@archimedes>
References: <20060314032306.GA6901@fetter.org> <4416E6CB.803@opencloud.com> <441AE333.2010003@logix-tt.com> <200603171152.24287.jdevisser@digitalfairway.com> <20060321185624.GA28126@fetter.org> <1142970005.23722.72.camel@archimedes>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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