Closed
Description
Is your feature request related to a problem? Please describe.
Since version 9.6, PostgreSQL emits a SEVERITY_NONLOCALIZED field with its error messages (code is V
). This field is missing in CRDB.
>>> import psycopg
>>> conn = psycopg.connect("postgresql://root@localhost:26257/defaultdb?sslmode=disable")
>>> try:
... conn.execute("select wat")
... except Exception as e:
... ex = e
>>> ex.diag.severity
'ERROR' # This might be in another language
>>> ex.diag.severity_nonlocalized
None
Describe the solution you'd like
Please introduce this field, as it might be used by clients to decide what to do with a notification.
It needs to be added here:
cockroach/pkg/sql/pgwire/conn.go
Line 1475 in daf3b48
Jira issue: CRDB-16071