View Single Post

   
  #4 (permalink)  
Old 04-16-2008, 12:58 AM
David Fetter
 
Posts: n/a
Default Re: pg_service.conf ?

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

jdbcostgresql://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!

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply With Quote