↑↓ select↵ open⌫ change scopeOpen full search

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

Wiki / SQLSTATE

22009 — invalid_time_zone_displacement_value

22009 is invalidtimezonedisplacementvalue. The fixed timetz_recv binary-input path rejects a GMT displacement outside the supported range.

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
invalid_time_zone_displacement_value
lang
en
sqlstate
22009

Definition PG 18

22009

At a glance {#at-a-glance}

22009 is invalid_time_zone_displacement_value. The fixed timetz_recv binary-input path rejects a GMT displacement outside the supported range.

Meaning {#meaning}

22009 is invalid_time_zone_displacement_value. The confirmed timetz_recv guard checks the received GMT displacement against PostgreSQL's supported limit; this is a binary input contract, not a generic session TimeZone setting error.

Messages {#messages}

The confirmed guard raises ERROR with primary time zone displacement out of range. It has no fixed DETAIL or HINT in this source path. This page is source-only; no natural runtime observation is claimed.

Diagnosis {#diagnosis}

Inspect the supplied zone offset and the binary timetz receiver or protocol decoder that delivered it. Keep an invalid displacement distinct from a generic datetime field overflow or a session TimeZone setting.

Response {#response}

Validate and replace the offset in the client or binary input that supplied it; use a named zone only when the input contract supports that representation. This is an ERROR: in an explicit transaction, roll back the transaction or roll back to a savepoint established before the failing conversion before continuing. Validate at the client boundary before repeating the conversion. 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}

22000, 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": "22009 is invalid_time_zone_displacement_value in SQLSTATE Class 22."
}
claims · mechanism.timezone-displacement
{
  "claim_id": "mechanism.timezone-displacement",
  "limits": "This is a displacement-range error, distinct from malformed date text or session TimeZone configuration.",
  "method": "Read the complete displacement guard.",
  "position": 1,
  "runtime": [],
  "sources": [
    "src.path.timezone-displacement"
  ],
  "statement": "The date/time binary receive path checks the GMT displacement against the supported TZDISP_LIMIT and emits 22009 when it is outside that range."
}
claims · history
{
  "claim_id": "history",
  "limits": "",
  "method": "Use catalogue boundary.",
  "position": 2,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "The locked catalogue records 22009 from 7.4 without proving an exact implementation introduction date."
}
messages · message.timezone
{
  "limits": "",
  "message_id": "message.timezone",
  "path": "",
  "position": 0,
  "raw": {
    "id": "message.timezone",
    "primary_template": "time zone displacement out of range",
    "severity_source": "ERROR",
    "sources": [
      "src.path.timezone-displacement"
    ],
    "sqlstate": "22009"
  },
  "severity": "ERROR",
  "sources": [
    "src.path.timezone-displacement"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "time zone displacement out of range",
      "position": 0,
      "role": "",
      "template": "time zone displacement out of range"
    }
  ]
}
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#L192"
}
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.timezone-displacement
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/utils/adt/date.c",
  "position": 2,
  "sha256": "4834c868f3461822eb0de972fe35b04f9fb9ba75cf2fa9794a67259536f35773",
  "source_id": "src.path.timezone-displacement",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/date.c#L2419-L2425"
}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · english-manuals:a9c652ccb1889c94f7860800ac57f3e5ee16a4f7995207d4bd48421d4639259c

Text language: en · english-manuals:a9c652ccb1889c94f7860800ac57f3e5ee16a4f7995207d4bd48421d4639259c