pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Provide a C-ctype variant expected file for test_regex_utf8
2+ messages / 1 participants
[nested] [flat]

* pgsql: Provide a C-ctype variant expected file for test_regex_utf8
@ 2026-08-26 20:25  Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Dunstan @ 2026-08-26 20:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Provide a C-ctype variant expected file for test_regex_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. A pending buildfarm client change will let an
animal be configured that way.

Fix by providing a second expected file holding the C-ctype answers, in
the manner of json_encoding.sql, which carries expected files for UTF8
and for SQL_ASCII.  The .sql needs no change.

This applies to releases 15 and 16 only. A better solution is available
for release 17 and up.

Backpatch to v15, v16 only.

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9ca3dfba7989ab62e172cfd611d8acdfd56606ac

Modified Files
--------------
.../test_regex/expected/test_regex_utf8_2.out      | 206 +++++++++++++++++++++
1 file changed, 206 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Provide a C-ctype variant expected file for test_regex_utf8
@ 2026-08-26 20:25  Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Dunstan @ 2026-08-26 20:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Provide a C-ctype variant expected file for test_regex_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. A pending buildfarm client change will let an
animal be configured that way.

Fix by providing a second expected file holding the C-ctype answers, in
the manner of json_encoding.sql, which carries expected files for UTF8
and for SQL_ASCII.  The .sql needs no change.

This applies to releases 15 and 16 only. A better solution is available
for release 17 and up.

Backpatch to v15, v16 only.

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9b84418952572fb749fdfb779994d22c398c9f0e

Modified Files
--------------
.../test_regex/expected/test_regex_utf8_2.out      | 206 +++++++++++++++++++++
1 file changed, 206 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-08-26 20:25 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-08-26 20:25 pgsql: Provide a C-ctype variant expected file for test_regex_utf8 Andrew Dunstan <andrew@dunslane.net>
2026-08-26 20:25 pgsql: Provide a C-ctype variant expected file for test_regex_utf8 Andrew Dunstan <andrew@dunslane.net>

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