cockroachdb / cockroachdb/cockroach

plpgsql: unnamed routine parameters are not handled correctly

Open
#145,407 3 comments 0 reactions 1 assignee Claimed by @DrewKimball View on GitHub
A-sql-plpgsql A-sql-routine branch-master branch-release-25.2 C-bug T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

There's a pg_regress test failing even after the fix in #143887:
```
root@localhost:26257/defaultdb> create function tftest(int) returns table(a int, b int) as $$
-> begin
-> return query select $1, $1+i from generate_series(1,5) g(i);
-> end;
-> $$ language plpgsql immutable strict;
-> select * from tftest(10);
CREATE FUNCTION

Time: 59ms total (execution 30ms / network 29ms)

a | b
-------+-------
NULL | NULL
NULL | NULL
NULL | NULL
NULL | NULL
NULL | NULL
(5 rows)

Time: 1ms total (execution 1ms / network 0ms)
```

Jira issue: CRDB-49883

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.