X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 67AC89DC847 for ; Tue, 14 Mar 2006 08:24:42 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18858-09 for ; Tue, 14 Mar 2006 08:24:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id E17D69DC809 for ; Tue, 14 Mar 2006 08:24:39 -0400 (AST) Received: (qmail 23371 invoked from network); 14 Mar 2006 12:24:43 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 14 Mar 2006 12:24:43 -0000 In-Reply-To: <20060314053058.GA10533@fetter.org> References: <20060314032306.GA6901@fetter.org> <6E83976B-8045-45F0-8CE9-254594635224@fastcrypt.com> <20060314053058.GA10533@fetter.org> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <9D3A667E-AA13-45A8-AE11-073FDB194585@fastcrypt.com> Cc: PostgreSQL JDBC List Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: pg_service.conf ? Date: Tue, 14 Mar 2006 07:24:41 -0500 To: David Fetter X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.121 required=5 tests=[AWL=0.121] X-Spam-Score: 0.121 X-Spam-Level: X-Archive-Number: 200603/66 X-Sequence-Number: 14847 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! >