From e37e448650dfd9f4afdf916843015c5cb33346c8 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Mon, 13 Feb 2012 22:49:07 -0500 Subject: [PATCH] Fix new create_function_3 regression tests not to rely on tuple order. Per buildfarm. --- .../regress/expected/create_function_3.out | 22 +++++++++---------- src/test/regress/sql/create_function_3.sql | 22 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/test/regress/expected/create_function_3.out b/src/test/regress/expected/create_function_3.out index a8c0526c22..e77799ac4e 100644 --- a/src/test/regress/expected/create_function_3.out +++ b/src/test/regress/expected/create_function_3.out @@ -17,7 +17,7 @@ CREATE FUNCTION functest_A_3() RETURNS bool LANGUAGE 'sql' SELECT proname, prorettype::regtype, proargtypes::regtype[] FROM pg_proc WHERE oid in ('functest_A_1'::regproc, 'functest_A_2'::regproc, - 'functest_A_3'::regproc); + 'functest_A_3'::regproc) ORDER BY proname; proname | prorettype | proargtypes --------------+------------+------------------- functest_a_1 | boolean | [0:1]={text,date} @@ -40,7 +40,7 @@ SELECT proname, provolatile FROM pg_proc WHERE oid in ('functest_B_1'::regproc, 'functest_B_2'::regproc, 'functest_B_3'::regproc, - 'functest_B_4'::regproc); + 'functest_B_4'::regproc) ORDER BY proname; proname | provolatile --------------+------------- functest_b_1 | v @@ -55,7 +55,7 @@ SELECT proname, provolatile FROM pg_proc WHERE oid in ('functest_B_1'::regproc, 'functest_B_2'::regproc, 'functest_B_3'::regproc, - 'functest_B_4'::regproc); + 'functest_B_4'::regproc) ORDER BY proname; proname | provolatile --------------+------------- functest_b_1 | v @@ -76,7 +76,7 @@ CREATE FUNCTION functext_C_3(int) RETURNS bool LANGUAGE 'sql' SELECT proname, prosecdef FROM pg_proc WHERE oid in ('functext_C_1'::regproc, 'functext_C_2'::regproc, - 'functext_C_3'::regproc); + 'functext_C_3'::regproc) ORDER BY proname; proname | prosecdef --------------+----------- functext_c_1 | f @@ -90,7 +90,7 @@ ALTER FUNCTION functext_C_3(int) SECURITY DEFINER; SELECT proname, prosecdef FROM pg_proc WHERE oid in ('functext_C_1'::regproc, 'functext_C_2'::regproc, - 'functext_C_3'::regproc); + 'functext_C_3'::regproc) ORDER BY proname; proname | prosecdef --------------+----------- functext_c_1 | f @@ -113,7 +113,7 @@ ERROR: COST must be positive SELECT proname, procost FROM pg_proc WHERE oid in ('functext_D_1'::regproc, 'functext_D_2'::regproc, - 'functext_D_3'::regproc); + 'functext_D_3'::regproc) ORDER BY proname; proname | procost --------------+--------- functext_d_1 | 100 @@ -127,7 +127,7 @@ ALTER FUNCTION functext_D_3(int,int) COST 0.0001; SELECT proname, procost FROM pg_proc WHERE oid in ('functext_D_1'::regproc, 'functext_D_2'::regproc, - 'functext_D_3'::regproc); + 'functext_D_3'::regproc) ORDER BY proname; proname | procost --------------+--------- functext_d_1 | 100 @@ -144,7 +144,7 @@ CREATE FUNCTION functext_E_2(int) RETURNS bool LANGUAGE 'sql' LEAKPROOF AS 'SELECT $1 > 100'; SELECT proname, proleakproof FROM pg_proc WHERE oid in ('functext_E_1'::regproc, - 'functext_E_2'::regproc); + 'functext_E_2'::regproc) ORDER BY proname; proname | proleakproof --------------+-------------- functext_e_1 | f @@ -155,7 +155,7 @@ ALTER FUNCTION functext_E_1(int) LEAKPROOF; ALTER FUNCTION functext_E_2(int) STABLE; -- unrelated change, no effect SELECT proname, proleakproof FROM pg_proc WHERE oid in ('functext_E_1'::regproc, - 'functext_E_2'::regproc); + 'functext_E_2'::regproc) ORDER BY proname; proname | proleakproof --------------+-------------- functext_e_1 | t @@ -413,7 +413,7 @@ SELECT proname, proisstrict FROM pg_proc WHERE oid in ('functext_F_1'::regproc, 'functext_F_2'::regproc, 'functext_F_3'::regproc, - 'functext_F_4'::regproc); + 'functext_F_4'::regproc) ORDER BY proname; proname | proisstrict --------------+------------- functext_f_1 | f @@ -429,7 +429,7 @@ SELECT proname, proisstrict FROM pg_proc WHERE oid in ('functext_F_1'::regproc, 'functext_F_2'::regproc, 'functext_F_3'::regproc, - 'functext_F_4'::regproc); + 'functext_F_4'::regproc) ORDER BY proname; proname | proisstrict --------------+------------- functext_f_1 | f diff --git a/src/test/regress/sql/create_function_3.sql b/src/test/regress/sql/create_function_3.sql index 1eed4e2979..f895aaa1a9 100644 --- a/src/test/regress/sql/create_function_3.sql +++ b/src/test/regress/sql/create_function_3.sql @@ -19,7 +19,7 @@ CREATE FUNCTION functest_A_3() RETURNS bool LANGUAGE 'sql' SELECT proname, prorettype::regtype, proargtypes::regtype[] FROM pg_proc WHERE oid in ('functest_A_1'::regproc, 'functest_A_2'::regproc, - 'functest_A_3'::regproc); + 'functest_A_3'::regproc) ORDER BY proname; -- -- IMMUTABLE | STABLE | VOLATILE @@ -36,7 +36,7 @@ SELECT proname, provolatile FROM pg_proc WHERE oid in ('functest_B_1'::regproc, 'functest_B_2'::regproc, 'functest_B_3'::regproc, - 'functest_B_4'::regproc); + 'functest_B_4'::regproc) ORDER BY proname; ALTER FUNCTION functest_B_2(int) VOLATILE; ALTER FUNCTION functest_B_3(int) COST 100; -- unrelated change, no effect @@ -44,7 +44,7 @@ SELECT proname, provolatile FROM pg_proc WHERE oid in ('functest_B_1'::regproc, 'functest_B_2'::regproc, 'functest_B_3'::regproc, - 'functest_B_4'::regproc); + 'functest_B_4'::regproc) ORDER BY proname; -- -- SECURITY DEFINER | INVOKER @@ -58,7 +58,7 @@ CREATE FUNCTION functext_C_3(int) RETURNS bool LANGUAGE 'sql' SELECT proname, prosecdef FROM pg_proc WHERE oid in ('functext_C_1'::regproc, 'functext_C_2'::regproc, - 'functext_C_3'::regproc); + 'functext_C_3'::regproc) ORDER BY proname; ALTER FUNCTION functext_C_1(int) IMMUTABLE; -- unrelated change, no effect ALTER FUNCTION functext_C_2(int) SECURITY INVOKER; @@ -66,7 +66,7 @@ ALTER FUNCTION functext_C_3(int) SECURITY DEFINER; SELECT proname, prosecdef FROM pg_proc WHERE oid in ('functext_C_1'::regproc, 'functext_C_2'::regproc, - 'functext_C_3'::regproc); + 'functext_C_3'::regproc) ORDER BY proname; -- -- COST @@ -82,7 +82,7 @@ CREATE FUNCTION functext_D_4(int,int) RETURNS int LANGUAGE 'sql' SELECT proname, procost FROM pg_proc WHERE oid in ('functext_D_1'::regproc, 'functext_D_2'::regproc, - 'functext_D_3'::regproc); + 'functext_D_3'::regproc) ORDER BY proname; ALTER FUNCTION functext_D_1(int,int) STABLE; -- unrelated change, no effect ALTER FUNCTION functext_D_2(int,int) COST 50; @@ -90,7 +90,7 @@ ALTER FUNCTION functext_D_3(int,int) COST 0.0001; SELECT proname, procost FROM pg_proc WHERE oid in ('functext_D_1'::regproc, 'functext_D_2'::regproc, - 'functext_D_3'::regproc); + 'functext_D_3'::regproc) ORDER BY proname; -- -- LEAKPROOF @@ -101,13 +101,13 @@ CREATE FUNCTION functext_E_2(int) RETURNS bool LANGUAGE 'sql' LEAKPROOF AS 'SELECT $1 > 100'; SELECT proname, proleakproof FROM pg_proc WHERE oid in ('functext_E_1'::regproc, - 'functext_E_2'::regproc); + 'functext_E_2'::regproc) ORDER BY proname; ALTER FUNCTION functext_E_1(int) LEAKPROOF; ALTER FUNCTION functext_E_2(int) STABLE; -- unrelated change, no effect SELECT proname, proleakproof FROM pg_proc WHERE oid in ('functext_E_1'::regproc, - 'functext_E_2'::regproc); + 'functext_E_2'::regproc) ORDER BY proname; -- list of built-in leakproof functions SELECT proname, prorettype::regtype, proargtypes::regtype[] @@ -129,7 +129,7 @@ SELECT proname, proisstrict FROM pg_proc WHERE oid in ('functext_F_1'::regproc, 'functext_F_2'::regproc, 'functext_F_3'::regproc, - 'functext_F_4'::regproc); + 'functext_F_4'::regproc) ORDER BY proname; ALTER FUNCTION functext_F_1(int) IMMUTABLE; -- unrelated change, no effect ALTER FUNCTION functext_F_2(int) STRICT; @@ -138,7 +138,7 @@ SELECT proname, proisstrict FROM pg_proc WHERE oid in ('functext_F_1'::regproc, 'functext_F_2'::regproc, 'functext_F_3'::regproc, - 'functext_F_4'::regproc); + 'functext_F_4'::regproc) ORDER BY proname; -- Cleanups DROP SCHEMA temp_func_test CASCADE; -- 2.40.0