summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane2022-12-27 18:06:42 +0000
committerTom Lane2022-12-27 18:06:42 +0000
commita5434c52586f37db7f538d3dcc8aa6dd62dfe61e (patch)
tree954be0262a9fb55583953b7d8311c54dea5caf91 /src/test
parent3ea7329c9a79ade27b5d3742d1a41ce6d0d9aca8 (diff)
Remove new locale dependency in regproc regression test.
The modified error message for regcollationin failure includes the database encoding, which it should've occurred to me is a portability hazard for the regression tests. Adjust the test so the expected output doesn't include that. In passing, fix a comment typo introduced in b8c0ffbd2. Per buildfarm.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/regproc.out14
-rw-r--r--src/test/regress/sql/regproc.sql4
2 files changed, 10 insertions, 8 deletions
diff --git a/src/test/regress/expected/regproc.out b/src/test/regress/expected/regproc.out
index 0c5e1d4be6..a034fbb346 100644
--- a/src/test/regress/expected/regproc.out
+++ b/src/test/regress/expected/regproc.out
@@ -268,10 +268,10 @@ SELECT regtype('ng_catalog.int4');
ERROR: schema "ng_catalog" does not exist
LINE 1: SELECT regtype('ng_catalog.int4');
^
+\set VERBOSITY sqlstate \\ -- error message is encoding-dependent
SELECT regcollation('ng_catalog."POSIX"');
-ERROR: collation "ng_catalog.POSIX" for encoding "SQL_ASCII" does not exist
-LINE 1: SELECT regcollation('ng_catalog."POSIX"');
- ^
+ERROR: 42704
+\set VERBOSITY default
-- schemaname not applicable
SELECT regrole('regress_regrole_test');
ERROR: role "regress_regrole_test" does not exist
@@ -454,10 +454,10 @@ SELECT pg_input_error_message('ng_catalog.pg_class', 'regclass');
relation "ng_catalog.pg_class" does not exist
(1 row)
-SELECT pg_input_error_message('ng_catalog."POSIX"', 'regcollation');
- pg_input_error_message
-----------------------------------------------------------------------
- collation "ng_catalog.POSIX" for encoding "SQL_ASCII" does not exist
+SELECT pg_input_is_valid('ng_catalog."POSIX"', 'regcollation');
+ pg_input_is_valid
+-------------------
+ f
(1 row)
SELECT pg_input_error_message('no_such_config', 'regconfig');
diff --git a/src/test/regress/sql/regproc.sql b/src/test/regress/sql/regproc.sql
index aa1f1bb17a..2cb8c9a253 100644
--- a/src/test/regress/sql/regproc.sql
+++ b/src/test/regress/sql/regproc.sql
@@ -74,7 +74,9 @@ SELECT regproc('ng_catalog.now');
SELECT regprocedure('ng_catalog.abs(numeric)');
SELECT regclass('ng_catalog.pg_class');
SELECT regtype('ng_catalog.int4');
+\set VERBOSITY sqlstate \\ -- error message is encoding-dependent
SELECT regcollation('ng_catalog."POSIX"');
+\set VERBOSITY default
-- schemaname not applicable
@@ -124,7 +126,7 @@ SELECT to_regnamespace('foo.bar');
-- Test soft-error API
SELECT pg_input_error_message('ng_catalog.pg_class', 'regclass');
-SELECT pg_input_error_message('ng_catalog."POSIX"', 'regcollation');
+SELECT pg_input_is_valid('ng_catalog."POSIX"', 'regcollation');
SELECT pg_input_error_message('no_such_config', 'regconfig');
SELECT pg_input_error_message('no_such_dictionary', 'regdictionary');
SELECT pg_input_error_message('Nonexistent', 'regnamespace');