pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Fetter <david@fetter.org>
To: Dave Cramer <pg@fastcrypt.com>
Cc: PostgreSQL JDBC List <pgsql-jdbc@postgresql.org>
Subject: Re: pg_service.conf ?
Date: Mon, 13 Mar 2006 21:30:58 -0800
Message-ID: <20060314053058.GA10533@fetter.org> (raw)
In-Reply-To: <6E83976B-8045-45F0-8CE9-254594635224@fastcrypt.com>
References: <20060314032306.GA6901@fetter.org>
	<6E83976B-8045-45F0-8CE9-254594635224@fastcrypt.com>

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!



view thread (23+ messages)  latest in thread

Message-ID: <20060314053058.GA10533@fetter.org>
Permalink:  ../20060314053058.GA10533@fetter.org/
Also on:    postgresql.org/message-id/20060314053058.GA10533@fetter.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: david@fetter.org, pg@fastcrypt.com
  Subject: Re: pg_service.conf ?
  In-Reply-To: <20060314053058.GA10533@fetter.org>
  References: <20060314032306.GA6901@fetter.org> <6E83976B-8045-45F0-8CE9-254594635224@fastcrypt.com> <20060314053058.GA10533@fetter.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox