Invent pg_hba_file_rules view to show the content of pg_hba.conf.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 30 Jan 2017 23:00:26 +0000 (18:00 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 30 Jan 2017 23:00:26 +0000 (18:00 -0500)
commitde16ab7238888b16825ad13f0bbe123632915e9b
tree25f5ea869a1e66eedabc60f4126b3da622f65ef3
parentd002f16c6ec38f76d1ee97367ba6af3000d441d0
Invent pg_hba_file_rules view to show the content of pg_hba.conf.

This view is designed along the same lines as pg_file_settings, to wit
it shows what is currently in the file, not what the postmaster has
loaded as the active settings.  That allows it to be used to pre-vet
edits before issuing SIGHUP.  As with the earlier view, go out of our
way to allow errors in the file to be reflected in the view, to assist
that use-case.

(We might at some point invent a view to show the current active settings,
but this is not that patch; and it's not trivial to do.)

Haribabu Kommi, reviewed by Ashutosh Bapat, Michael Paquier, Simon Riggs,
and myself

Discussion: https://postgr.es/m/CAJrrPGerH4jiwpcXT1-46QXUDmNp2QDrG9+-Tek_xC8APHShYw@mail.gmail.com
doc/src/sgml/catalogs.sgml
doc/src/sgml/client-auth.sgml
src/backend/catalog/system_views.sql
src/backend/libpq/hba.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/libpq/hba.h
src/test/regress/expected/rules.out
src/test/regress/expected/sysviews.out
src/test/regress/sql/sysviews.sql