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

From Dave Cramer
Subject Re: pg_service.conf ?
Date
Msg-id 9D3A667E-AA13-45A8-AE11-073FDB194585@fastcrypt.com
Whole thread Raw
In response to Re: pg_service.conf ?  (David Fetter <david@fetter.org>)
List pgsql-jdbc
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!
>


pgsql-jdbc by date:

Previous
From: David Fetter
Date:
Subject: Re: pg_service.conf ?
Next
From: Christopher Browne
Date:
Subject: Re: pg_service.conf ?