0Z000 — diagnostics_exception
SQLSTATE 0Z000 is the Diagnostics Exception category. In PostgreSQL's fixed source, the concrete PL/pgSQL path is the member 0Z002; the category row itself is not a separate report group. Use 0Z000 to classify an observed diagnostics member, then keep the member code and its message for diagnosis.
English manual coverage begins with PostgreSQL 8.1. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- aliases
- Unknown
- class name
- Diagnostics Exception
- condition name
- diagnostics_exception
- lang
- en
- sqlstate
- 0Z000
Definition PG 18
0Z000
At a glance {#at-a-glance}
SQLSTATE 0Z000 is the Diagnostics Exception category. In PostgreSQL's fixed source, the concrete PL/pgSQL path is the member 0Z002; the category row itself is not a separate report group. Use 0Z000 to classify an observed diagnostics member, then keep the member code and its message for diagnosis.
Meaning {#meaning}
The class covers errors raised while accessing diagnostic state. The resolved member path in pl_exec.c reports 0Z002 when GET STACKED DIAGNOSTICS or parameterless RAISE is used outside an active exception handler. That member evidence explains one PostgreSQL path; it does not make every diagnostics API failure a 0Z000 emission.
Messages {#messages}
No fixed PostgreSQL message variant was adopted for this condition because the bounded scan did not resolve a native emitting call.
Diagnosis {#diagnosis}
Read the member code and message first. For 0Z002, inspect whether the statement ran inside the EXCEPTION handler that owns the stacked error; ordinary function control flow and a handler’s scope matter more than the class name. If another member or producer is present, follow that component’s source and preserve its diagnostic fields.
Response {#response}
Place GET STACKED DIAGNOSTICS and parameterless RAISE inside the active PL/pgSQL exception handler they depend on. If the intended behavior is to raise a new error outside a handler, supply an explicit condition/message instead of trying to re-use stacked state. Preserve the member error and do not retry a failed routine merely because it belongs to class 0Z.
Versions {#versions}
The locked catalogue places this condition at least by PostgreSQL 9.2.0. The release definitions cover the published snapshots listed in the facts block; source-path status is limited to the fixed PostgreSQL 18.6 context cited below.
Related {#related}
Sources {#sources}
The fixed errcodes definition establishes the class. The concrete member paths are GET STACKED DIAGNOSTICS and parameterless RAISE; the PL/pgSQL error-trapping documentation defines the handler boundary. See the structured evidence record for fixed source paths, scan scope, and unresolved runtime boundaries.
Compare versions
SQLSTATE evidence and recorded runtime versions
claims · identity
{
"claim_id": "identity",
"limits": "",
"method": "Read the fixed errcodes definition row, severity, and macro.",
"position": 0,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "0Z000 is diagnostics_exception in SQLSTATE Class 0Z."
}claims · scan-boundary
{
"claim_id": "scan-boundary",
"limits": "The scan does not cover external wrappers, drivers, extensions, remote systems, or user code; absence from this scan is not an absolute absence claim.",
"method": "Compare resolved report groups with the fixed macro mapping.",
"position": 1,
"runtime": [],
"sources": [
"src.calls.REL_18_6",
"src.errcodes.18.6"
],
"statement": "No resolved 0Z000 report group was found in the locked PostgreSQL 18.6 core/contrib call scan."
}claims · history-boundary
{
"claim_id": "history-boundary",
"limits": "Definition presence is not an emitting-path observation.",
"method": "Compare canonical release-definition facts with the available history boundary.",
"position": 2,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "The locked release definitions establish catalogue presence from the known 9.2.0 boundary; they do not establish a precise introducing release or runtime use."
}sources · src.errcodes.18.6
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/utils/errcodes.txt",
"position": 0,
"sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
"source_id": "src.errcodes.18.6",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L141"
}sources · src.calls.REL_18_6
{
"commit": "",
"docs_url": "",
"kind": "local_artifact",
"location": "",
"path": "raw/calls/REL_18_6.jsonl",
"position": 1,
"sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf",
"source_id": "src.calls.REL_18_6",
"tag": "",
"url": ""
}Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · english-manuals:60743b5c1cefb936dc56d351e3757be16345a67ba8f0bcc8939740e131eff788
Text language: en · english-manuals:60743b5c1cefb936dc56d351e3757be16345a67ba8f0bcc8939740e131eff788