pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Be more careful with error paths in pg_set_regex_collation().
Date: Thu, 05 Sep 2024 19:22:48 +0000
Message-ID: <E1smI48-000IRW-1E@gemulon.postgresql.org> (raw)

Be more careful with error paths in pg_set_regex_collation().

Set global variables after error paths so that they don't end up in an
inconsistent state.

The inconsistent state doesn't lead to an actual problem, because
after an error, pg_set_regex_collation() will be called again before
the globals are accessed.

Change extracted from patch by Andreas Karlsson, though not discussed
explicitly.

Discussion: https://postgr.es/m/60929555-4709-40a7-b136-bcb44cff5a3c@proxel.se

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7829f85a6285b3703a53ba5963a4df2e768014df

Modified Files
--------------
src/backend/regex/regc_pg_locale.c | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)



Message-ID: <E1smI48-000IRW-1E@gemulon.postgresql.org>
Permalink:  ../E1smI48-000IRW-1E@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1smI48-000IRW-1E@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Be more careful with error paths in pg_set_regex_collation().
  In-Reply-To: <E1smI48-000IRW-1E@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