Re: pg_service.conf ? - Mailing list pgsql-jdbc

From Mark Lewis
Subject Re: pg_service.conf ?
Date
Msg-id 1142970005.23722.72.camel@archimedes
Whole thread Raw
In response to Re: pg_service.conf ?  (David Fetter <david@fetter.org>)
Responses Re: pg_service.conf ?
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: pg_service.conf ?
Next
From: David Fetter
Date:
Subject: Re: pg_service.conf ?