From: Dave Cramer <pg@fastcrypt.com>
To: David Fetter <david@fetter.org>
Cc: PostgreSQL JDBC List <pgsql-jdbc@postgresql.org>
Subject: Re: pg_service.conf ?
Date: Tue, 14 Mar 2006 07:24:41 -0500
Message-ID: <9D3A667E-AA13-45A8-AE11-073FDB194585@fastcrypt.com> (raw)
In-Reply-To: <20060314053058.GA10533@fetter.org>
References: <20060314032306.GA6901@fetter.org>
<6E83976B-8045-45F0-8CE9-254594635224@fastcrypt.com>
<20060314053058.GA10533@fetter.org>
David.
OK, so as I understand it the client would be responsible for
finding, parsing this file and reading the appropriate section.
Assuming the PGSYSCONFDIR environment variable is setup properly and
the driver has access to the file this would work.
This would be a lot easier if the server managed this file.
Dave
On 14-Mar-06, at 12:30 AM, David Fetter wrote:
> On Mon, Mar 13, 2006 at 11:11:43PM -0500, Dave Cramer wrote:
>> David,
>>
>> Can you give us the use case? How would you expect this to work ?
>
> Let's imagine you have a pg_service.conf that says:
>
> [foo]
> host=foo.example.com
> dbname=foo
> port=5555
> user=dcramer
>
> [bar]
> host=bar.example.com
> dbname=bar
> port=5554
> user=dfetter
>
> [baz]
> host=baz.sample.com
> dbname=baz
> port=5553
> user=brass_monkey
>
> You'd use a connect string that looked something like
>
> jdbc:postgresql://service=foo/
>
> to get to the db called foo running foo.example.com on port 5555 as
> ROLE (aka user) dcramer. The pg_service.conf could then be
> distributed around and available to every kind of application--even
> ones not written in java.
>
> Cheers,
> D
> --
> David Fetter david@fetter.org http://fetter.org/
> phone: +1 415 235 3778
>
> Remember to vote!
>
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: pg@fastcrypt.com, david@fetter.org
Subject: Re: pg_service.conf ?
In-Reply-To: <9D3A667E-AA13-45A8-AE11-073FDB194585@fastcrypt.com>
References: <20060314032306.GA6901@fetter.org> <6E83976B-8045-45F0-8CE9-254594635224@fastcrypt.com> <20060314053058.GA10533@fetter.org> <9D3A667E-AA13-45A8-AE11-073FDB194585@fastcrypt.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