From: Markus Schaber <schabi@logix-tt.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: pg_service.conf ?
Date: Fri, 17 Mar 2006 17:26:27 +0100
Message-ID: <441AE333.2010003@logix-tt.com> (raw)
In-Reply-To: <4416E6CB.803@opencloud.com>
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>
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
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: schabi@logix-tt.com
Subject: Re: pg_service.conf ?
In-Reply-To: <441AE333.2010003@logix-tt.com>
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> <441AE333.2010003@logix-tt.com>
* 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