cockroachdb / cockroachdb/cockroach
plpgsql: add support for adding context to errors with RAISE
Open
A-sql-plpgsql
C-enhancement
docs-done
docs-known-limitation
T-sql-queries
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Postgres allows `RAISE` statements to specify options for annotating the raised error/notice. `MESSAGE`, `DETAIL`, `HINT`, and `ERRCODE` will be handled when #105251 is resolved, but we should also consider supporting the `COLUMN`, `CONSTRAINT`, `DATATYPE`, `TABLE`, and `SCHEMA` options, which allow the user to supply the name of a schema object related to the error. This issue tracks adding support for these latter options. See the postgres docs for more info: https://www.postgresql.org/docs/current/plpgsql-errors-and-messages.html
Jira issue: CRDB-29452
Contributor guide
Assessment
This issue has not been assessed yet.