pgsql: Add C test function for pg_locale.h APIs. - Mailing list pgsql-committers

From Jeff Davis
Subject pgsql: Add C test function for pg_locale.h APIs.
Date
Msg-id E1wyZrD-00000001wOh-23HR@gemulon.postgresql.org
Whole thread
List pgsql-committers
Add C test function for pg_locale.h APIs.

Test the API independently to account for fallback paths that aren't
adequately tested from SQL.

The backport to 18 also tests the previously-supported behavior where
a size of -1 meant that the string was NUL-terminated. That behavior
was later removed in 19.

Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/v36ssaygf7grb3qzfsjhtdzi7kqd45ds56nyuf7gi5qjml4qbb@ezmfqzmhlrs2
Backpatch-through: 18

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3b984ab52a4eb667b49271fbde5dfbff7b5ef801

Modified Files
--------------
src/test/regress/expected/misc_functions.out |  40 ++++++++
src/test/regress/regress.c                   | 134 +++++++++++++++++++++++++++
src/test/regress/sql/misc_functions.sql      |  25 +++++
3 files changed, 199 insertions(+)


Attachment

pgsql-committers by date:

Previous
From: David Rowley
Date:
Subject: pgsql: Fix incorrect nmembers calculation in test_bitmapset
Next
From: Jeff Davis
Date:
Subject: pgsql: Add C test function for pg_locale.h APIs.