pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Provide a C-ctype variant expected file for test_regex_utf8
Date: Wed, 26 Aug 2026 20:25:47 +0000
Message-ID: <E1wzKBt-00000002Epl-3vdj@gemulon.postgresql.org> (raw)

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(+)



view thread (2+ messages)  latest in thread

Message-ID: <E1wzKBt-00000002Epl-3vdj@gemulon.postgresql.org>
Permalink:  ../E1wzKBt-00000002Epl-3vdj@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wzKBt-00000002Epl-3vdj@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: andrew@dunslane.net, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Provide a C-ctype variant expected file for test_regex_utf8
  In-Reply-To: <E1wzKBt-00000002Epl-3vdj@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