X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 8EDBA9DC843 for ; Tue, 21 Mar 2006 15:40:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 49355-01 for ; Tue, 21 Mar 2006 15:40:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mir3-fs.mir3.com (mail.mir3.com [65.208.188.100]) by postgresql.org (Postfix) with ESMTP id DB1049DC883 for ; Tue, 21 Mar 2006 15:40:05 -0400 (AST) Received: mir3-fs.mir3.com 172.16.1.11 from 172.16.2.68 172.16.2.68 via HTTP with MS-WebStorage 6.0.6249 Received: from archimedes.mirlogic.com by mir3-fs.mir3.com; 21 Mar 2006 11:40:05 -0800 Subject: Re: pg_service.conf ? From: Mark Lewis To: David Fetter Cc: Jan de Visser , pgsql-jdbc@postgresql.org 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> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: MIR3, Inc. Date: Tue, 21 Mar 2006 11:40:05 -0800 Message-Id: <1142970005.23722.72.camel@archimedes> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-22) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.138 required=5 tests=[AWL=0.137, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.138 X-Spam-Level: X-Archive-Number: 200603/90 X-Sequence-Number: 14871 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