pgsql: Fix test_valid_server_encoding helper function. - Mailing list pgsql-committers

From Thomas Munro
Subject pgsql: Fix test_valid_server_encoding helper function.
Date
Msg-id E1vsCLo-001D4Q-07@gemulon.postgresql.org
Whole thread Raw
List 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.parragi@percona.com>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bd626ef093b2e5f279285a344c8ac53d67cdfd76

Modified Files
--------------
src/test/regress/expected/encoding.out | 2 ++
src/test/regress/regress.c             | 2 +-
src/test/regress/sql/encoding.sql      | 2 ++
3 files changed, 5 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Noah Misch
Date:
Subject: pgsql: Suppress new "may be used uninitialized" warning.
Next
From: Thomas Munro
Date:
Subject: pgsql: Fix test_valid_server_encoding helper function.