cockroachdb / cockroachdb/cockroach

sql: unnamed INOUT parameters are not supported

Open
#121,251 1 comment 0 reactions 0 assignees View on GitHub
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

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.