mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-12 09:27:04 +08:00
Add prokind column, replacing proisagg and proiswindow
The new column distinguishes normal functions, procedures, aggregates, and window functions. This replaces the existing columns proisagg and proiswindow, and replaces the convention that procedures are indicated by prorettype == 0. Also change prorettype to be VOIDOID for procedures. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Michael Paquier <michael@paquier.xyz>
This commit is contained in:
@ -175,6 +175,14 @@ DROP FUNCTION functest_b_1; -- error, not found
|
||||
DROP FUNCTION functest_b_2; -- error, ambiguous
|
||||
|
||||
|
||||
-- CREATE OR REPLACE tests
|
||||
|
||||
CREATE FUNCTION functest1(a int) RETURNS int LANGUAGE SQL AS 'SELECT $1';
|
||||
CREATE OR REPLACE FUNCTION functest1(a int) RETURNS int LANGUAGE SQL WINDOW AS 'SELECT $1';
|
||||
CREATE OR REPLACE PROCEDURE functest1(a int) LANGUAGE SQL AS 'SELECT $1';
|
||||
DROP FUNCTION functest1(a int);
|
||||
|
||||
|
||||
-- Cleanups
|
||||
DROP SCHEMA temp_func_test CASCADE;
|
||||
DROP USER regress_unpriv_user;
|
||||
|
||||
Reference in New Issue
Block a user