pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor more logic for compilation of regular expressions in hb
Date: Fri, 21 Oct 2022 00:56:20 +0000
Message-ID: <E1olgKh-00052J-Sy@gemulon.postgresql.org> (raw)

Refactor more logic for compilation of regular expressions in hba.c

It happens that the parts of hba.conf that are planned to be extended
to support regular expressions would finish by using the same error
message as the one used currently for pg_ident.conf when a regular
expression cannot be compiled, as long as the routine centralizing the
logic, regcomp_auth_token(), knows from which file the regexp comes from
and its line location in the so-said file.

This change makes the follow-up patches slightly simpler, and the logic
remains the same.  I suspect that this makes the proposal to add support
for file inclusions in pg_ident.conf and pg_hba.conf slightly simpler,
as well.

Extracted from a larger patch by the same author.  This is similar to
the refactoring done in fc579e1.

Author: Bertrand Drouvot
Discussion: https://postgr.es/m/fff0d7c1-8ad4-76a1-9db3-0ab6ec338bf7@amazon.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a903971351023bf08b3d6165220d0c8ab8ddada3

Modified Files
--------------
src/backend/libpq/hba.c | 44 +++++++++++++++++++++++++-------------------
1 file changed, 25 insertions(+), 19 deletions(-)



Message-ID: <E1olgKh-00052J-Sy@gemulon.postgresql.org>
Permalink:  ../E1olgKh-00052J-Sy@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1olgKh-00052J-Sy@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Refactor more logic for compilation of regular expressions in hb
  In-Reply-To: <E1olgKh-00052J-Sy@gemulon.postgresql.org>
  References: <E1olgKh-00052J-Sy@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox