diff --git a/src/test/regress/expected/encoding.out b/src/test/regress/expected/encoding.out index cac1cb74782..b3655527b0a 100644 --- a/src/test/regress/expected/encoding.out +++ b/src/test/regress/expected/encoding.out @@ -419,7 +419,9 @@ SELECT SUBSTRING(c FROM 3000 FOR 1) FROM toast_4b_utf8; DROP TABLE encoding_tests; DROP TABLE toast_4b_utf8; DROP FUNCTION test_encoding; +DROP FUNCTION test_wchars_to_text; DROP FUNCTION test_text_to_wchars; +DROP FUNCTION test_valid_server_encoding; DROP FUNCTION test_mblen_func; DROP FUNCTION test_bytea_to_text; DROP FUNCTION test_text_to_bytea; diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c index 96cf30ac925..a02f41c9727 100644 --- a/src/test/regress/regress.c +++ b/src/test/regress/regress.c @@ -1251,7 +1251,7 @@ PG_FUNCTION_INFO_V1(test_valid_server_encoding); Datum test_valid_server_encoding(PG_FUNCTION_ARGS) { - return pg_valid_server_encoding(text_to_cstring(PG_GETARG_TEXT_PP(0))); + PG_RETURN_BOOL(pg_valid_server_encoding(text_to_cstring(PG_GETARG_TEXT_PP(0))) >= 0); } /* Provide SQL access to IsBinaryCoercible() */ diff --git a/src/test/regress/sql/encoding.sql b/src/test/regress/sql/encoding.sql index 782f90f0d62..d591818c3eb 100644 --- a/src/test/regress/sql/encoding.sql +++ b/src/test/regress/sql/encoding.sql @@ -231,7 +231,9 @@ SELECT SUBSTRING(c FROM 3000 FOR 1) FROM toast_4b_utf8; DROP TABLE encoding_tests; DROP TABLE toast_4b_utf8; DROP FUNCTION test_encoding; +DROP FUNCTION test_wchars_to_text; DROP FUNCTION test_text_to_wchars; +DROP FUNCTION test_valid_server_encoding; DROP FUNCTION test_mblen_func; DROP FUNCTION test_bytea_to_text; DROP FUNCTION test_text_to_bytea;