Re: pg_service.conf ?

From: David Fetter <david(at)fetter(dot)org>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: PostgreSQL JDBC List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: pg_service.conf ?
Date: 2006-03-14 05:30:58
Message-ID: 20060314053058.GA10533@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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 David Fetter 2006-03-14 05:36:30 Re: pg_service.conf ?
Previous Message Dave Cramer 2006-03-14 04:11:43 Re: pg_service.conf ?