| From: | Jeff Davis <jdavis(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Be more careful with error paths in pg_set_regex_collation(). |
| Date: | 2024-09-05 19:22:48 |
| Message-ID: | E1smI48-000IRW-1E@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2024-09-06 01:49:10 | pgsql: doc PG 17 relnotes: remove tab complete for MERGE/SPLIT partit. |
| Previous Message | Tom Lane | 2024-09-05 16:42:45 | pgsql: Prevent mis-encoding of "trailing junk after numeric literal" er |