mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +03:00
Allow CALL with polymorphic type arguments
In order to be able to resolve polymorphic types, we need to set fn_expr before invoking the procedure.
This commit is contained in:
@ -116,6 +116,13 @@ SELECT * FROM cp_test;
|
||||
100 | Hello
|
||||
(8 rows)
|
||||
|
||||
-- polymorphic types
|
||||
CREATE PROCEDURE ptest6(a int, b anyelement)
|
||||
LANGUAGE SQL
|
||||
AS $$
|
||||
SELECT NULL::int;
|
||||
$$;
|
||||
CALL ptest6(1, 2);
|
||||
-- various error cases
|
||||
CALL version(); -- error: not a procedure
|
||||
ERROR: version() is not a procedure
|
||||
|
@ -84,6 +84,17 @@ CALL ptest5(b => 'Hello', a => 10);
|
||||
SELECT * FROM cp_test;
|
||||
|
||||
|
||||
-- polymorphic types
|
||||
|
||||
CREATE PROCEDURE ptest6(a int, b anyelement)
|
||||
LANGUAGE SQL
|
||||
AS $$
|
||||
SELECT NULL::int;
|
||||
$$;
|
||||
|
||||
CALL ptest6(1, 2);
|
||||
|
||||
|
||||
-- various error cases
|
||||
|
||||
CALL version(); -- error: not a procedure
|
||||
|
Reference in New Issue
Block a user