pgsql: Fix test_valid_server_encoding helper function.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix test_valid_server_encoding helper function.
Date: 2026-02-17 04:07:19
Message-ID: E1vsCMo-001D7t-0Z@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix test_valid_server_encoding helper function.

Commit c67bef3f325 introduced this test helper function for use by
src/test/regress/sql/encoding.sql, but its logic was incorrect. It
confused an encoding ID for a boolean so it gave the wrong results for
some inputs, and also forgot the usual return macro. The mistake didn't
affect values actually used in the test, so there is no change in
behavior.

Also drop it and another missed function at the end of the test, for
consistency.

Backpatch-through: 14
Author: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/88fec079f13dae07a252339a74ed070284e94a20

Modified Files
--------------
src/test/regress/input/encoding.source | 2 ++
src/test/regress/output/encoding.source | 2 ++
src/test/regress/regress.c | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2026-02-17 09:23:34 pgsql: Test most StaticAssert macros in C++ extensions
Previous Message Thomas Munro 2026-02-17 04:07:05 pgsql: Fix test_valid_server_encoding helper function.