Re: pg_service.conf

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Mark Woodward <pgsql(at)mohawksoft(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_service.conf
Date: 2006-02-19 14:53:45
Message-ID: 20060219145345.GC1323@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Sun, Feb 19, 2006 at 10:00:01AM -0500, Mark Woodward wrote:
> > It turns out what you like actually exists, lookup the "service"
> > parameter in the connectdb string. It will read the values for the
> > server, port, etc from a pg_service.conf file.
> >
> > There is an example in the tree but it looks something like the following:
> >
> > [servicename]
> > dbname=blah
> > user=blah
> > pass=blah
> >
> > So all you need to specify is "service=servicename" and it will grab
> > the parameters. This allows you to change the connection without
> > changeing the code.
> >
>
> This is a great feature!!
>
> It doesn't seem to be documented in the administrators guide. Its
> mentioned in the libpq section, and only a reference to
> pg_service.conf.sample

Indeed, I only just found out about it yesterday. It's a very little
known feature that needs some advertisement. Right now we need to work
up some documentation patches so people come across it easier.

Where do you think it should be mentioned?
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Douglas McNaught 2006-02-19 14:58:01 Re: pg_service.conf
Previous Message Simon Riggs 2006-02-19 14:53:26 Re: [HACKERS] Patch Submission Guidelines

Browse pgsql-patches by date

  From Date Subject
Next Message Douglas McNaught 2006-02-19 14:58:01 Re: pg_service.conf
Previous Message Simon Riggs 2006-02-19 14:53:26 Re: [HACKERS] Patch Submission Guidelines