mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	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.
			
			
This commit is contained in:
		@@ -127,7 +127,7 @@ domain_state_setup(Oid domainType, bool binary, MemoryContext mcxt)
 | 
				
			|||||||
 * execExpr*.c, but we execute each constraint separately, rather than
 | 
					 * execExpr*.c, but we execute each constraint separately, rather than
 | 
				
			||||||
 * compiling them in-line within a larger expression.
 | 
					 * compiling them in-line within a larger expression.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * If escontext points to an ErrorStateContext, any failures are reported
 | 
					 * If escontext points to an ErrorSaveContext, any failures are reported
 | 
				
			||||||
 * there, otherwise they are ereport'ed.  Note that we do not attempt to do
 | 
					 * there, otherwise they are ereport'ed.  Note that we do not attempt to do
 | 
				
			||||||
 * soft reporting of errors raised during execution of CHECK constraints.
 | 
					 * soft reporting of errors raised during execution of CHECK constraints.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -268,10 +268,10 @@ SELECT regtype('ng_catalog.int4');
 | 
				
			|||||||
ERROR:  schema "ng_catalog" does not exist
 | 
					ERROR:  schema "ng_catalog" does not exist
 | 
				
			||||||
LINE 1: SELECT regtype('ng_catalog.int4');
 | 
					LINE 1: SELECT regtype('ng_catalog.int4');
 | 
				
			||||||
                       ^
 | 
					                       ^
 | 
				
			||||||
 | 
					\set VERBOSITY sqlstate \\ -- error message is encoding-dependent
 | 
				
			||||||
SELECT regcollation('ng_catalog."POSIX"');
 | 
					SELECT regcollation('ng_catalog."POSIX"');
 | 
				
			||||||
ERROR:  collation "ng_catalog.POSIX" for encoding "SQL_ASCII" does not exist
 | 
					ERROR:  42704
 | 
				
			||||||
LINE 1: SELECT regcollation('ng_catalog."POSIX"');
 | 
					\set VERBOSITY default
 | 
				
			||||||
                            ^
 | 
					 | 
				
			||||||
-- schemaname not applicable
 | 
					-- schemaname not applicable
 | 
				
			||||||
SELECT regrole('regress_regrole_test');
 | 
					SELECT regrole('regress_regrole_test');
 | 
				
			||||||
ERROR:  role "regress_regrole_test" does not exist
 | 
					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
 | 
					 relation "ng_catalog.pg_class" does not exist
 | 
				
			||||||
(1 row)
 | 
					(1 row)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SELECT pg_input_error_message('ng_catalog."POSIX"', 'regcollation');
 | 
					SELECT pg_input_is_valid('ng_catalog."POSIX"', 'regcollation');
 | 
				
			||||||
                        pg_input_error_message                        
 | 
					 pg_input_is_valid 
 | 
				
			||||||
----------------------------------------------------------------------
 | 
					-------------------
 | 
				
			||||||
 collation "ng_catalog.POSIX" for encoding "SQL_ASCII" does not exist
 | 
					 f
 | 
				
			||||||
(1 row)
 | 
					(1 row)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SELECT pg_input_error_message('no_such_config', 'regconfig');
 | 
					SELECT pg_input_error_message('no_such_config', 'regconfig');
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -74,7 +74,9 @@ SELECT regproc('ng_catalog.now');
 | 
				
			|||||||
SELECT regprocedure('ng_catalog.abs(numeric)');
 | 
					SELECT regprocedure('ng_catalog.abs(numeric)');
 | 
				
			||||||
SELECT regclass('ng_catalog.pg_class');
 | 
					SELECT regclass('ng_catalog.pg_class');
 | 
				
			||||||
SELECT regtype('ng_catalog.int4');
 | 
					SELECT regtype('ng_catalog.int4');
 | 
				
			||||||
 | 
					\set VERBOSITY sqlstate \\ -- error message is encoding-dependent
 | 
				
			||||||
SELECT regcollation('ng_catalog."POSIX"');
 | 
					SELECT regcollation('ng_catalog."POSIX"');
 | 
				
			||||||
 | 
					\set VERBOSITY default
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- schemaname not applicable
 | 
					-- schemaname not applicable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -124,7 +126,7 @@ SELECT to_regnamespace('foo.bar');
 | 
				
			|||||||
-- Test soft-error API
 | 
					-- Test soft-error API
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SELECT pg_input_error_message('ng_catalog.pg_class', 'regclass');
 | 
					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_config', 'regconfig');
 | 
				
			||||||
SELECT pg_input_error_message('no_such_dictionary', 'regdictionary');
 | 
					SELECT pg_input_error_message('no_such_dictionary', 'regdictionary');
 | 
				
			||||||
SELECT pg_input_error_message('Nonexistent', 'regnamespace');
 | 
					SELECT pg_input_error_message('Nonexistent', 'regnamespace');
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user