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