Skip to content

Commit

Permalink
sql: add tests with function invocation in procedure argument
Browse files Browse the repository at this point in the history
This commit adds a couple of tests that show that functions can be used
in procedure argument expressions.

Release note: None
  • Loading branch information
mgartner committed Oct 19, 2023
1 parent 539baa2 commit f559fec
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pkg/sql/logictest/testdata/logic_test/procedure
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,25 @@ SELECT * FROM t
----
1 11

statement ok
CREATE FUNCTION one() RETURNS INT LANGUAGE SQL AS 'SELECT 1'

statement ok
CALL t_update(one(), 12)

query II
SELECT * FROM t
----
1 12

statement ok
CALL t_update(one(), one()+12)

query II
SELECT * FROM t
----
1 13

statement ok
CREATE FUNCTION t_update() RETURNS INT LANGUAGE SQL AS 'SELECT 1'

Expand Down

0 comments on commit f559fec

Please sign in to comment.