00000 — successful_completion
00000 is the successful-completion SQLSTATE. PostgreSQL's error machinery selects it by default for messages below WARNING when no more specific code is set; a successful command does not need an error message.
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
- Successful Completion
- condition name
- successful_completion
- lang
- en
- sqlstate
- 00000
Definition PG 18
00000 — successful_completion
At a glance {#at-a-glance}
00000 is the successful-completion SQLSTATE. PostgreSQL's error machinery selects it by default for messages below WARNING when no more specific code is set; a successful command does not need an error message.
Meaning {#meaning}
The default SQLSTATE is selected by errstart from the message level; elog.c sets ERRCODE_SUCCESSFUL_COMPLETION for levels below WARNING. This is a source-level default in the error machinery, not an application error mechanism or a promise that a normal command carries an ErrorResponse.
Messages and diagnostics {#messages}
Command completion is normally represented by a successful result and command tag; it does not carry an ErrorResponse SQLSTATE. In the fixed elog path, 00000 is initialized only when no more-specific code is supplied and the message level is below WARNING. Preserve a diagnostic's actual protocol message type and severity alongside the code: 00000 is not an ERROR default and does not turn a successful result into an ErrorResponse.
Diagnosis {#diagnosis}
Check the client result status and command tag first. If a client reports 00000 alongside a failed status or an ErrorResponse, inspect the producer and client API's status handling rather than treating it as normal successful completion or searching for an assumed error detail.
Response {#response}
Handle a successful command result as completion. For a NoticeResponse carrying 00000, retain the notice separately from the command result; investigate client status handling only when those signals conflict. Do not retry a successful command merely because this code is present.
Versions {#versions}
The locked catalogue has 00000 from 9.0.23 through 18.6 and 19 Beta 3, with known_present_by 7.4. The fixed 18.6 elog.c path shows the default assignment for levels below WARNING; it is not a runtime test of every client protocol.
Related {#related}
01000 is the warning class; 02000 is no-data, a different condition; P0002 is PL/pgSQL no_data_found.
Sources {#sources}
errcodes.txt— definition, SHA-2566e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba.elog.c— fixed path, SHA-256766d30a426ba1d9597657bd46fb890da3e37e4ae53a83d1245bf082ed9433c33.- Structured evidence — fixed sources, message groups, and runtime boundary.
Compare versions
SQLSTATE evidence and recorded runtime versions
claims · identity
{
"claim_id": "identity",
"limits": "",
"method": "Read the fixed errcodes definition row and macro.",
"position": 0,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "00000 is successful_completion in Class 00."
}claims · default-selection
{
"claim_id": "default-selection",
"limits": "This is only the low-level default for levels below WARNING; it does not establish a normal ErrorResponse or successful command protocol result, and no natural runtime is claimed.",
"method": "Read the default sqlerrcode selection in errstart().",
"position": 1,
"runtime": [],
"sources": [
"src.elog.18.6"
],
"statement": "In the fixed 18.6 error machinery, levels below WARNING initialize the SQLSTATE to ERRCODE_SUCCESSFUL_COMPLETION when no more specific code is supplied."
}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"
}sources · src.elog.18.6
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/utils/error/elog.c",
"position": 1,
"sha256": "766d30a426ba1d9597657bd46fb890da3e37e4ae53a83d1245bf082ed9433c33",
"source_id": "src.elog.18.6",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/error/elog.c"
}sources · src.calls.REL_18_6
{
"commit": "",
"docs_url": "",
"kind": "local_artifact",
"location": "",
"path": "raw/calls/REL_18_6.jsonl",
"position": 2,
"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:11e99deac7d62e2437842ab7980bf9f20df0e7c3070f3d49e70ce6fccde9945b
Text language: en · english-manuals:11e99deac7d62e2437842ab7980bf9f20df0e7c3070f3d49e70ce6fccde9945b