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

Reply via email to