Proposal: wildcards in pg_service.conf
От | Albe Laurenz |
---|---|
Тема | Proposal: wildcards in pg_service.conf |
Дата | |
Msg-id | D960CB61B694CF459DCFB4B0128514C2F3442B@exadv11.host.magwien.gv.at обсуждение исходный текст |
Ответы |
Re: Proposal: wildcards in pg_service.conf
|
Список | pgsql-hackers |
I'd like to extend the libpq service file by allowing wildcards, e.g. like this: [%] host=dbhost.mycompany.com dbname=% Such an entry would match all service parameters, and all ocurrences of the wildcard right of a = would be replaced with the service parameter. That implies that a [%] entry is only useful as last entry in pg_service.conf. I'd like to keep it simple and only accept standalone wildcards (not things like 'prefix%suffix'), but that's debatable (at the cost of more work). As a special case, I would want to allow wildcards in LDAP URLs like this: [%] ldap://ldap.mycompany.com/cn=%,cn=databases?connectstring?one?objectclass=* This also explains my preference of '%' over '*' as a wildcard to avoid problems with * in LDAP filter expressions. The added value is that you don't need one line per database in the configuration file. The two examples above illustrate two cases where I think that such a setup could be useful: a) You have "most of" your databases in one cluster. b) You use LDAP to store your connection parameters centrally. What do you think? Yours, Laurenz Albe
В списке pgsql-hackers по дате отправления: