cockroachdb / cockroachdb/cockroach

plpgsql: add support for adding context to errors with RAISE

Open
#106,237 0 comments 0 reactions 0 assignees View on GitHub
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

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.