{
  "schema": 1,
  "sqlstate": "22008",
  "condition_name": "datetime_field_overflow",
  "sources": [
    {
      "id": "src.errcodes.18.6",
      "kind": "upstream_source",
      "source_role": "condition_definition",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/errcodes.txt",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L166",
      "lines": "166"
    },
    {
      "id": "src.calls.REL_18_6",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    },
    {
      "id": "src.path.date-recv",
      "kind": "upstream_source",
      "source_role": "source_guard",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/date.c",
      "sha256": "4834c868f3461822eb0de972fe35b04f9fb9ba75cf2fa9794a67259536f35773",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/date.c#L217-L223",
      "lines": "217-223"
    },
    {
      "id": "src.path.date-field",
      "kind": "upstream_source",
      "source_role": "source_guard",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/date.c",
      "sha256": "4834c868f3461822eb0de972fe35b04f9fb9ba75cf2fa9794a67259536f35773",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/date.c#L271-L293",
      "lines": "271-293"
    },
    {
      "id": "src.path.time-field",
      "kind": "upstream_source",
      "source_role": "source_guard",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/date.c",
      "sha256": "4834c868f3461822eb0de972fe35b04f9fb9ba75cf2fa9794a67259536f35773",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/date.c#L1649-L1654",
      "lines": "1649-1654"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "22008 is datetime_field_overflow in SQLSTATE Class 22.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read fixed definition."
    },
    {
      "id": "mechanism.date-range",
      "statement": "The date input/binary receive and field validation paths use 22008 for an unrepresentable date or field; the primary wording identifies whether the failure is a field or range check.",
      "sources": [
        "src.path.date-recv",
        "src.path.date-field"
      ],
      "method": "Read date.c range guards.",
      "limits": "This page does not claim every timestamp or interval overflow uses the same message."
    },
    {
      "id": "mechanism.time-field",
      "statement": "The make_time path uses the same condition for an out-of-range time field.",
      "sources": [
        "src.path.time-field"
      ],
      "method": "Read the time-field guard.",
      "limits": "Inspect the named target type and operation before choosing a repair."
    },
    {
      "id": "history",
      "statement": "The locked catalogue records 22008 from 7.4 without proving an exact implementation introduction date.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Use catalogue boundary."
    }
  ],
  "messages": [
    {
      "id": "message.date-range",
      "sqlstate": "22008",
      "primary_template": "date out of range",
      "severity_source": "ERROR",
      "sources": [
        "src.path.date-recv"
      ]
    },
    {
      "id": "message.date-field",
      "sqlstate": "22008",
      "primary_template": "date field value out of range: %d-%02d-%02d",
      "severity_source": "ERROR",
      "sources": [
        "src.path.date-field"
      ]
    },
    {
      "id": "message.time-field",
      "sqlstate": "22008",
      "primary_template": "time field value out of range: %d:%02d:%02g",
      "severity_source": "ERROR",
      "sources": [
        "src.path.time-field"
      ]
    }
  ],
  "usage_evidence": [
    {
      "scope": "definition",
      "status": "definition_only",
      "evidence_ids": [
        "identity"
      ]
    },
    {
      "scope": "fixed-source-path",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "mechanism.date-range",
        "mechanism.time-field"
      ]
    },
    {
      "scope": "history",
      "status": "unknown",
      "evidence_ids": [
        "history"
      ]
    },
    {
      "scope": "natural-runtime",
      "status": "unknown",
      "evidence_ids": [
        "mechanism.date-range"
      ]
    }
  ],
  "runtime": []
}
