pgsql: Add support for regexps on database and user entries in pg_hba.c

2022-10-23 Thread Michael Paquier
Add support for regexps on database and user entries in pg_hba.conf As of this commit, any database or user entry beginning with a slash (/) is considered as a regular expression. This is particularly useful for users, as now there is no clean way to match pattern on multiple HBA lines. For exam

pgsql: Fix and improve TAP tests for pg_hba.conf and regexps

2022-10-23 Thread Michael Paquier
Fix and improve TAP tests for pg_hba.conf and regexps The new tests have been reporting a warning hidden in the logs, as of "Odd number of elements in hash assignment" (perlcritic or similar did not report an issue, actually). This comes down to a typo in the test "matching regexp for username" f

pgsql: Improve tab completion for ALTER STATISTICS SET in psql

2022-10-23 Thread Michael Paquier
Improve tab completion for ALTER STATISTICS SET in psql The code was completing this pattern with a list of settable characters, and it was possible to reach this state after completing a "ALTER STATISTICS " with SET. Author: Vignesh C Discussion: https://postgr.es/m/CALDaNm2HHF_371o+EeSjxDDS17