@@ -98,43 +98,6 @@ SELECT proname, prosecdef FROM pg_proc
9898 functext_c_3 | t
9999(3 rows)
100100
101- --
102- -- COST
103- --
104- CREATE FUNCTION functext_D_1(int,int) RETURNS int LANGUAGE 'sql'
105- AS 'SELECT $1 + $2';
106- CREATE FUNCTION functext_D_2(int,int) RETURNS int LANGUAGE 'internal'
107- AS 'int4pl';
108- CREATE FUNCTION functext_D_3(int,int) RETURNS int LANGUAGE 'sql'
109- COST 500 AS 'SELECT $1 * $2';
110- CREATE FUNCTION functext_D_4(int,int) RETURNS int LANGUAGE 'sql'
111- COST 0 AS 'SELECT $1 / $2'; -- Error
112- ERROR: COST must be positive
113- SELECT proname, procost FROM pg_proc
114- WHERE oid in ('functext_D_1'::regproc,
115- 'functext_D_2'::regproc,
116- 'functext_D_3'::regproc) ORDER BY proname;
117- proname | procost
118- --------------+---------
119- functext_d_1 | 100
120- functext_d_2 | 1
121- functext_d_3 | 500
122- (3 rows)
123-
124- ALTER FUNCTION functext_D_1(int,int) STABLE; -- unrelated change, no effect
125- ALTER FUNCTION functext_D_2(int,int) COST 50;
126- ALTER FUNCTION functext_D_3(int,int) COST 0.0001;
127- SELECT proname, procost FROM pg_proc
128- WHERE oid in ('functext_D_1'::regproc,
129- 'functext_D_2'::regproc,
130- 'functext_D_3'::regproc) ORDER BY proname;
131- proname | procost
132- --------------+---------
133- functext_d_1 | 100
134- functext_d_2 | 50
135- functext_d_3 | 0.0001
136- (3 rows)
137-
138101--
139102-- LEAKPROOF
140103--
@@ -440,7 +403,7 @@ SELECT proname, proisstrict FROM pg_proc
440403
441404-- Cleanups
442405DROP SCHEMA temp_func_test CASCADE;
443- NOTICE: drop cascades to 19 other objects
406+ NOTICE: drop cascades to 16 other objects
444407DETAIL: drop cascades to function functest_a_1(text,date)
445408drop cascades to function functest_a_2(text[])
446409drop cascades to function functest_a_3()
@@ -451,9 +414,6 @@ drop cascades to function functest_b_4(integer)
451414drop cascades to function functext_c_1(integer)
452415drop cascades to function functext_c_2(integer)
453416drop cascades to function functext_c_3(integer)
454- drop cascades to function functext_d_1(integer,integer)
455- drop cascades to function functext_d_2(integer,integer)
456- drop cascades to function functext_d_3(integer,integer)
457417drop cascades to function functext_e_1(integer)
458418drop cascades to function functext_e_2(integer)
459419drop cascades to function functext_f_1(integer)
0 commit comments