Re: new feature: LDAP database name resolution

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: new feature: LDAP database name resolution
Дата
Msg-id 20060221094225.GC24481@svana.org
обсуждение исходный текст
Ответ на Re: new feature: LDAP database name resolution  ("Albe Laurenz" <all@adv.magwien.gv.at>)
Ответы Re: new feature: LDAP database name resolution  (Hans-Juergen Schoenig <postgres@cybertec.at>)
Список pgsql-hackers
On Tue, Feb 21, 2006 at 10:02:58AM +0100, Albe Laurenz wrote:
> Thank you also for drawing my attention to pg_service.conf - I have not
> been aware of it.
> There are two 'shortcomings':
> - It still means that you have to change the config file on every
> client.

Well yes. However, you could generate the config file automatically
from another source, either LDAP or something else.

> - This feature cannot be used with psql or ecpg, right?

Well it can since it works with any library that uses libpq, though
it's not immediately obvious. Unfortunatly it appears ecpg doesn't
appear to allow you to specify a connection string, so you have to do
it using the environment variable.

Instead of using a commandline argument to psql you have to do it like
this:

PGSERVICE=test psql

For an ecpg application, setting the PGSERVICE environment variable and
then connecting as DEFAULT should work.

For Perl CBI applications where you specify the connect string
yourself, you can just use "service=test".

> Do you think that it is worth the effort for me to look into extending
> the
> pg_service.conf/PGSYSCONFDIR approach to LDAP (and changing psql to use
> it)?

Given that pg_service.conf is handled by libpq, it would be better to
change it there so all applications connecting to postgres can use it,
not just psql.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.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.

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

Предыдущее
От: "Albe Laurenz"
Дата:
Сообщение: Re: new feature: LDAP database name resolution
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Resurrecting some old patches