42P12 — Invalid database definition
42P12 (invalid_database_definition) This condition names an invalid database definition, but its core emitter was not resolved in this scan.
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
- Syntax Error or Access Rule Violation
- condition name
- invalid_database_definition
- lang
- en
- sqlstate
- 42P12
Definition PG 18
42P12 — Invalid database definition
At a glance {#at-a-glance}
42P12 (invalid_database_definition) This condition names an invalid database definition, but its core emitter was not resolved in this scan.
Meaning {#meaning}
The catalogue condition is defined as invalid_database_definition. The bounded 18.6 call scan did not resolve a core emitting group for this code, so this page gives the condition boundary without inventing a database-operation trigger.
Diagnosis {#diagnosis}
When it appears, retain the server message, database name, statement, and server log context. First determine whether the response came from PostgreSQL core, an extension, a client-side mapping, or a wrapper; the condition name alone does not identify the failing catalogue object.
Response {#response}
Use the resolved message and fixed-version source path to choose a repair. Check the affected database definition and dependencies only after the actual emitter is identified; this bounded scan does not support a more specific SQL recipe or a fixed severity. If the actual response is an ERROR inside an explicit transaction, apply the normal ROLLBACK or pre-error savepoint rule, but do not present that generic protocol recovery as a confirmed 42P12 emitter path.
Messages {#messages}
No message variant is included because the bounded source scan did not resolve a core emitting group for this condition.
Versions {#versions}
The locked catalogue shows this condition by PostgreSQL 7.4; behavior here is fixed to PostgreSQL 18.6 source. Catalogue presence is a range boundary, not proof that every message or feature began in that release.
Related {#related}
Sources {#sources}
Source messages, line anchors, and evidence limits are recorded in authored evidence.
- The fixed definition is recorded in
errcodes.txt.
Compare versions
SQLSTATE evidence and recorded runtime versions
claims · identity.class-and-condition
{
"claim_id": "identity.class-and-condition",
"limits": "Identity does not enumerate all source branches or client failures.",
"method": "Read fixed REL_18_6 errcodes.txt and locked facts.",
"position": 0,
"runtime": [],
"sources": [
"src.errcodes.42P12.18.6"
],
"statement": "42P12 is the invalid_database_definition condition in Class 42."
}claims · bounded-scan
{
"claim_id": "bounded-scan",
"limits": "This is a scan boundary, not proof that the condition is never emitted.",
"method": "Read all candidate records for this code in raw/calls/REL_18_6.jsonl.",
"position": 1,
"runtime": [],
"sources": [
"src.calls.REL_18_6.42P12"
],
"statement": "The bounded REL_18_6 call scan did not resolve a core emitting group for this condition."
}claims · versions.catalogue-boundary
{
"claim_id": "versions.catalogue-boundary",
"limits": "First observed release is a lower bound, not precise behavioral introduction.",
"method": "Read locked catalogue facts and definition snapshot.",
"position": 2,
"runtime": [],
"sources": [
"src.errcodes.42P12.18.6"
],
"statement": "Locked catalogue snapshots show this condition by PostgreSQL 7.4; source behavior here is fixed at PostgreSQL 18.6."
}sources · src.errcodes.42P12.18.6
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "line 393",
"path": "src/backend/utils/errcodes.txt",
"position": 0,
"sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
"source_id": "src.errcodes.42P12.18.6",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L393"
}sources · src.calls.REL_18_6.42P12
{
"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.42P12",
"tag": "",
"url": ""
}Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · english-manuals:c90db7a07544cbae9b63af80b4c52e6b58d4807b0b8a1934afaedea57cd852f9
Text language: en · english-manuals:c90db7a07544cbae9b63af80b4c52e6b58d4807b0b8a1934afaedea57cd852f9