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

From Markus Schaber
Subject Re: pg_service.conf ?
Date
Msg-id 441AE333.2010003@logix-tt.com
Whole thread Raw
In response to Re: pg_service.conf ?  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: pg_service.conf ?
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: "Tomi NA"
Date:
Subject: Re: meta-data problem
Next
From: Jan de Visser
Date:
Subject: Re: pg_service.conf ?