mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Stabilize recently-added information_schema test queries.
These queries could show unexpected entries if the core system, or concurrently-running test scripts, created any functions that would appear in the information_schema views. Restrict them to showing functions belonging to this test's schema, as the far-older nearby test case does. Per experimentation with conversion of some built-in functions to SQL-function-body style.
This commit is contained in:
		@@ -475,26 +475,34 @@ SELECT r0.routine_name, r1.routine_name
 | 
			
		||||
  FROM information_schema.routine_routine_usage rru
 | 
			
		||||
       JOIN information_schema.routines r0 ON r0.specific_name = rru.specific_name
 | 
			
		||||
       JOIN information_schema.routines r1 ON r1.specific_name = rru.routine_name
 | 
			
		||||
  WHERE r0.routine_schema = 'temp_func_test' AND
 | 
			
		||||
        r1.routine_schema = 'temp_func_test'
 | 
			
		||||
  ORDER BY 1, 2;
 | 
			
		||||
  routine_name  |  routine_name  
 | 
			
		||||
----------------+----------------
 | 
			
		||||
 functest_is_4b | functest_is_4a
 | 
			
		||||
(1 row)
 | 
			
		||||
 | 
			
		||||
SELECT routine_name, sequence_name FROM information_schema.routine_sequence_usage ORDER BY 1, 2;
 | 
			
		||||
SELECT routine_name, sequence_name FROM information_schema.routine_sequence_usage
 | 
			
		||||
  WHERE routine_schema = 'temp_func_test'
 | 
			
		||||
  ORDER BY 1, 2;
 | 
			
		||||
 routine_name  | sequence_name 
 | 
			
		||||
---------------+---------------
 | 
			
		||||
 functest_is_5 | functest1
 | 
			
		||||
 functest_is_6 | functest1
 | 
			
		||||
(2 rows)
 | 
			
		||||
 | 
			
		||||
SELECT routine_name, table_name, column_name FROM information_schema.routine_column_usage ORDER BY 1, 2;
 | 
			
		||||
SELECT routine_name, table_name, column_name FROM information_schema.routine_column_usage
 | 
			
		||||
  WHERE routine_schema = 'temp_func_test'
 | 
			
		||||
  ORDER BY 1, 2;
 | 
			
		||||
 routine_name  | table_name | column_name 
 | 
			
		||||
---------------+------------+-------------
 | 
			
		||||
 functest_is_7 | functest2  | a
 | 
			
		||||
(1 row)
 | 
			
		||||
 | 
			
		||||
SELECT routine_name, table_name FROM information_schema.routine_table_usage ORDER BY 1, 2;
 | 
			
		||||
SELECT routine_name, table_name FROM information_schema.routine_table_usage
 | 
			
		||||
  WHERE routine_schema = 'temp_func_test'
 | 
			
		||||
  ORDER BY 1, 2;
 | 
			
		||||
 routine_name  | table_name 
 | 
			
		||||
---------------+------------
 | 
			
		||||
 functest_is_7 | functest2
 | 
			
		||||
 
 | 
			
		||||
@@ -277,10 +277,18 @@ SELECT r0.routine_name, r1.routine_name
 | 
			
		||||
  FROM information_schema.routine_routine_usage rru
 | 
			
		||||
       JOIN information_schema.routines r0 ON r0.specific_name = rru.specific_name
 | 
			
		||||
       JOIN information_schema.routines r1 ON r1.specific_name = rru.routine_name
 | 
			
		||||
  WHERE r0.routine_schema = 'temp_func_test' AND
 | 
			
		||||
        r1.routine_schema = 'temp_func_test'
 | 
			
		||||
  ORDER BY 1, 2;
 | 
			
		||||
SELECT routine_name, sequence_name FROM information_schema.routine_sequence_usage
 | 
			
		||||
  WHERE routine_schema = 'temp_func_test'
 | 
			
		||||
  ORDER BY 1, 2;
 | 
			
		||||
SELECT routine_name, table_name, column_name FROM information_schema.routine_column_usage
 | 
			
		||||
  WHERE routine_schema = 'temp_func_test'
 | 
			
		||||
  ORDER BY 1, 2;
 | 
			
		||||
SELECT routine_name, table_name FROM information_schema.routine_table_usage
 | 
			
		||||
  WHERE routine_schema = 'temp_func_test'
 | 
			
		||||
  ORDER BY 1, 2;
 | 
			
		||||
SELECT routine_name, sequence_name FROM information_schema.routine_sequence_usage ORDER BY 1, 2;
 | 
			
		||||
SELECT routine_name, table_name, column_name FROM information_schema.routine_column_usage ORDER BY 1, 2;
 | 
			
		||||
SELECT routine_name, table_name FROM information_schema.routine_table_usage ORDER BY 1, 2;
 | 
			
		||||
 | 
			
		||||
DROP FUNCTION functest_IS_4a CASCADE;
 | 
			
		||||
DROP SEQUENCE functest1 CASCADE;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user