Add rule_number to pg_hba_file_rules and map_number to pg_ident_file_mappings
authorMichael Paquier <michael@paquier.xyz>
Wed, 26 Oct 2022 06:22:15 +0000 (15:22 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 26 Oct 2022 06:22:15 +0000 (15:22 +0900)
commitc591300a8f54d9711157d9a8866f022a257ec4ee
tree4427a3ceb1c015b2137006cec57297de0d9f67a0
parent37d264478ab47e8fa03751c39ba2c5dd447b89c8
Add rule_number to pg_hba_file_rules and map_number to pg_ident_file_mappings

These numbers are strictly-monotone identifiers assigned to each rule
of pg_hba_file_rules and each map of pg_ident_file_mappings when loading
the HBA and ident configuration files, indicating the order in which
they are checked at authentication time, until a match is found.

With only one file loaded currently, this is equivalent to the line
numbers assigned to the entries loaded if one wants to know their order,
but this becomes mandatory once the inclusion of external files is
added to the HBA and ident files to be able to know in which order the
rules and/or maps are applied at authentication.  Note that NULL is used
when a HBA or ident entry cannot be parsed or validated, aka when an
error exists, contrary to the line number.

Bump catalog version.

Author: Julien Rouhaud
Discussion: https://postgr.es/m/20220223045959.35ipdsvbxcstrhya@jrouhaud
doc/src/sgml/system-views.sgml
src/backend/utils/adt/hbafuncs.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.dat
src/test/regress/expected/rules.out