↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / SQLSTATE

22000 — data_exception

22000 is dataexception. The fixed arrayappend path accepts an empty or one-dimensional array argument and reports the dimensionality requirement otherwise; other Data Exception paths belong to their own subsystem.

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
Data Exception
condition name
data_exception
lang
en
sqlstate
22000

Definition PG 18

22000

At a glance {#at-a-glance}

22000 is data_exception. The fixed array_append path accepts an empty or one-dimensional array argument and reports the dimensionality requirement otherwise; other Data Exception paths belong to their own subsystem.

Meaning {#meaning}

22000 is data_exception. The fixed array_append path accepts an empty or one-dimensional array argument and reports the dimensionality requirement otherwise; other Data Exception paths belong to their own subsystem.

Messages {#messages}

The confirmed guard raises ERROR with primary message argument must be empty or one-dimensional array. This fixed path has no separate DETAIL or HINT. The page is source-only; no natural runtime observation is claimed.

Diagnosis {#diagnosis}

Check the complete message, the array_append call, and the argument type before changing data. The confirmed path rejects an array argument that is neither empty nor one-dimensional.

Response {#response}

Correct the array shape or use a function contract that accepts the intended dimensions. This is an ERROR: in an explicit transaction, roll back the whole transaction or roll back to a savepoint established before the call before continuing. Re-run only after validating the argument; do not treat every Data Exception as the same repair. No runtime case was run for this page.

Versions {#versions}

The locked catalogue records this condition from 7.4 in the listed formal snapshots and 19beta3; fixed source coverage is PostgreSQL 18.6.

Related {#related}

22001, 22003, 22004

Sources {#sources}

See the fixed source links and scope limits in the structured evidence record.

Compare versions

SQLSTATE evidence and recorded runtime versions

claims · identity
{
  "claim_id": "identity",
  "limits": "",
  "method": "Read fixed definition.",
  "position": 0,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "22000 is data_exception in SQLSTATE Class 22."
}
claims · mechanism.array-append
{
  "claim_id": "mechanism.array-append",
  "limits": "This confirms one core array path, not every Data Exception caller.",
  "method": "Read the complete array_userfuncs.c branch.",
  "position": 1,
  "runtime": [],
  "sources": [
    "src.path.array-append"
  ],
  "statement": "array_append accepts an empty or one-dimensional array; a multi-dimensional argument emits 22000 with the dimensionality message."
}
claims · history
{
  "claim_id": "history",
  "limits": "",
  "method": "Use catalogue boundary.",
  "position": 2,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "The locked catalogue records 22000 from 7.4 without proving an exact implementation introduction date."
}
messages · message.array
{
  "limits": "",
  "message_id": "message.array",
  "path": "",
  "position": 0,
  "raw": {
    "id": "message.array",
    "primary_template": "argument must be empty or one-dimensional array",
    "severity_source": "ERROR",
    "sources": [
      "src.path.array-append"
    ],
    "sqlstate": "22000"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.array-append"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "argument must be empty or one-dimensional array",
      "position": 0,
      "role": "",
      "template": "argument must be empty or one-dimensional array"
    }
  ]
}
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#L161"
}
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": ""
}
sources · src.path.array-append
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/utils/adt/array_userfuncs.c",
  "position": 2,
  "sha256": "dc14f95e12c92360f8b10c7546d8af4a0b41a6a0431efc2a4f5b236155eadb50",
  "source_id": "src.path.array-append",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/array_userfuncs.c#L173-L175"
}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · english-manuals:b1ec08024ec4db456ecace958837ce2cfc60a162d9952b4d94dc496422cf84fa

Text language: en · english-manuals:b1ec08024ec4db456ecace958837ce2cfc60a162d9952b4d94dc496422cf84fa