Re: pg_service.conf

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pg_service.conf
Дата
Msg-id 200602250228.k1P2SUF06093@candle.pha.pa.us
обсуждение исходный текст
Ответ на pg_service.conf  ("Mark Woodward" <pgsql@mohawksoft.com>)
Список pgsql-hackers
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
> 
> IMHO we should push for this to be the mainstream connection
> methodology!!! The variables: host, port, and dbname are very problematic
> for admins and developers who often live in different worlds.

The documenation is sparse because at the time it was added, there was
little interest in it from the community, so a single mention was added
and documentation was pushed into the config file.  We can adjust that
now that there is interest.

--  Bruce Momjian   http://candle.pha.pa.us SRA OSS, Inc.   http://www.sraoss.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Clark C. Evans"
Дата:
Сообщение: Re: constraints and sql92 information_schema compliance
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: AC_REPLACE_FUNCS([getaddrinfo]) in 8.1.3