cockroachdb / cockroachdb/cockroach
sql: unnamed INOUT parameters are not supported
Open
A-sql-plpgsql
A-sql-routine
C-enhancement
docs-done
docs-known-limitation
docs-todo
T-sql-queries
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
We currently prohibit creation of routines with unnamed INOUT parameters due to difficulties with producing the correct output.
----
Consider the following logic test:
```
statement ok
CREATE PROCEDURE p(INOUT INT) AS $$ BEGIN NULL; END; $$ LANGUAGE PLpgSQL;
query I colnames
CALL p(1);
----
column1
1
```
We currently handle it incorrectly since we have an unnamed INOUT parameter - we give it NULL value. A similar problem arises for UDFs (and for procedures too) when the INOUT parameter has DEFAULT expression.
Jira issue: CRDB-37156
Contributor guide
Assessment
This issue has not been assessed yet.