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 60F539DCBFC for ; Fri, 17 Mar 2006 12:26:26 -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 04345-08 for ; Fri, 17 Mar 2006 12:26:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (unknown [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id 1CFFA9DCBAF for ; Fri, 17 Mar 2006 12:26:24 -0400 (AST) Received: from kingfisher.intern.logix-tt.com (Tb24f.t.pppool.de [89.55.178.79]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 4619165636; Fri, 17 Mar 2006 17:26:48 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id A8EBF1819FBD9; Fri, 17 Mar 2006 17:26:27 +0100 (CET) Message-ID: <441AE333.2010003@logix-tt.com> Date: Fri, 17 Mar 2006 17:26:27 +0100 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: pg_service.conf ? References: <20060314032306.GA6901@fetter.org> <6E83976B-8045-45F0-8CE9-254594635224@fastcrypt.com> <20060314053058.GA10533@fetter.org> <9D3A667E-AA13-45A8-AE11-073FDB194585@fastcrypt.com> <87bqw9rxxw.fsf@wolfe.cbbrowne.com> <4416E6CB.803@opencloud.com> In-Reply-To: <4416E6CB.803@opencloud.com> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.099 required=5 tests=[AWL=0.099] X-Spam-Score: 0.099 X-Spam-Level: X-Archive-Number: 200603/77 X-Sequence-Number: 14858 Hi, Oliver, Oliver Jowett wrote: >> Note that libpq takes the perspective that pg_service.conf should live >> in the ../etc directory for the PostgreSQL build. Thus, if psql is >> living as /opt/dbs/pgsql825/bin/psql, then this would be in >> /opt/dbs/pgsql825/etc/pg_service.conf. > > The big thing here is "how do we find the config file?". The JDBC driver > has no concept of an "installation" .. it's just classes that the JVM > manages to load somehow. I could imagine a specific search order in a defined subset of: - ClassLoader.GetResource('pg_service.conf') - System.getEnv("PG_JDBC_SERVICE_CONF") - System.getEnv("HOME") + File.separator + ".pgpass" - System.getEnv("PGSYSCONFDIR") + File.separator + "pg_service.conf" - System.getProperty('pg_service.conf') // contains the path of the file - new InitialContext().lookup('pg_service.conf') - A driver URL parameter specifying the location of the file HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org