Re: pg_hba_lookup function to get all matching pg_hba.conf entries
От | Pavel Stehule |
---|---|
Тема | Re: pg_hba_lookup function to get all matching pg_hba.conf entries |
Дата | |
Msg-id | CAFj8pRBpi216e6Ds_BjEDM_xc_L8gJysupZ3TKddZcD-qjyJYA@mail.gmail.com обсуждение исходный текст |
Ответ на | pg_hba_lookup function to get all matching pg_hba.conf entries (Haribabu Kommi <kommi.haribabu@gmail.com>) |
Ответы |
Re: pg_hba_lookup function to get all matching pg_hba.conf entries
|
Список | pgsql-hackers |
Hi
postgres=# select pg_hba_lookup('postgres','all');
pg_hba_lookup
-------------------------------------------------------
(84,local,"[""all""]","[""all""]",,,trust,{})
(86,host,"[""all""]","[""all""]",127.0.0.1,,trust,{})
(88,host,"[""all""]","[""all""]",::1,,trust,{})
Here I attached a proof of concept patch for the same.
Any suggestions/comments on this proposed approach?
If I understand well to your proposal, the major benefit is in impossibility to enter pg_hba keywords - so you don't need to analyse if parameter is keyword or not? It has sense, although It can be hard to do image about pg_hba conf from these partial views.
There can be other way - theoretically we can have a function pg_hba_debug with similar API like pg_hba_conf. The result will be a content of pg_hba.conf with information about result of any rule.
Regards
Pavel
В списке pgsql-hackers по дате отправления: