cockroachdb / cockroachdb/cockroach
plpgsql: add support for NOT NULL variable declarations
Open
A-sql-plpgsql
C-enhancement
docs-done
docs-known-limitation
E-starter
T-sql-foundations
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
This issue tracks adding support for `NOT NULL` variables, which throw a runtime error when a PLpgSQL function attempts to assign a NULL value to them: https://www.postgresql.org/docs/current/plpgsql-declarations.html
While this behavior could be implemented as its own execution operator / logic, it seems best to first implement `RAISE` (throwing errors) so that the logic can be shared.
Epic: CRDB-799
Jira issue: CRDB-28935
Contributor guide
Assessment
This issue has not been assessed yet.