Re: pg_service.conf ?

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: PostgreSQL JDBC List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: pg_service.conf ?
Date: 2006-03-14 12:24:41
Message-ID: 9D3A667E-AA13-45A8-AE11-073FDB194585@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)fetter(dot)org http://fetter.org/
> phone: +1 415 235 3778
>
> Remember to vote!
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Christopher Browne 2006-03-14 12:51:55 Re: pg_service.conf ?
Previous Message David Fetter 2006-03-14 05:36:30 Re: pg_service.conf ?