| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Pin two ctype-dependent test_regex_utf8 cases to pg_c_utf8 |
| Date: | 2026-08-26 20:25:46 |
| Message-ID: | E1wzKBt-00000002Epf-3eVC@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Pin two ctype-dependent test_regex_utf8 cases to pg_c_utf8
test_regex_utf8 decides whether to run by looking at the database
encoding alone, but two of its cases, [[:graph:]] and [[:print:]] over
E'xᔀሷ', depend on the ctype as well. In a database with encoding
UTF8 and locale C they match just the x, because isgraph() and isprint()
are false for anything outside ASCII, and the file fails.
No buildfarm animal builds such a cluster, which is why this went
unnoticed, and why the to_date() crash in 18.5 went undetected for want
of exactly this coverage. A pending buildfarm client change will let an
animal be configured that way.
Fix by giving the two cases an explicit collation, so that they exercise
a fixed Unicode ctype instead of whatever the database happened to be
initialized with. test_regex() already passes its input collation down
to the regex compiler. The expected results are unchanged; only the
echoed queries differ.
Backpatch-through: 17 (15 and 16 get a different fix)
Reviewed-by: Jonathan Gonzalez V. <jonathan(at)abdiel(dot)eu>
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/8554d746964dd6ceaea827e7edbc45a1bc5948c9
Modified Files
--------------
src/test/modules/test_regex/expected/test_regex_utf8.out | 6 ++++--
src/test/modules/test_regex/sql/test_regex_utf8.sql | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2026-08-26 20:25:47 | pgsql: Provide a C-ctype variant expected file for test_regex_utf8 |
| Previous Message | Peter Geoghegan | 2026-08-26 19:38:33 | pgsql: Export subxip[] for snapshots taken during recovery. |