Re: pg_service.conf ?

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: pg_service.conf ?
Дата
Msg-id 9D3A667E-AA13-45A8-AE11-073FDB194585@fastcrypt.com
обсуждение исходный текст
Ответ на Re: pg_service.conf ?  (David Fetter <david@fetter.org>)
Список 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 по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: pg_service.conf ?
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: pg_service.conf ?