Be more careful with error paths in pg_set_regex_collation().
Jeff Davis <jdavis@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/regex/regc_pg_locale.c | modified | +17 −13 |
Discussion
- tiny step toward threading: reduce dependence on setlocale() 33 messages · 2024-06-06 → 2025-10-28