{
  "schema": 1,
  "sqlstate": "22003",
  "condition_name": "numeric_value_out_of_range",
  "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#L197",
      "lines": "197"
    },
    {
      "id": "src.calls.REL_18_6",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    },
    {
      "id": "src.path.integer-input",
      "kind": "upstream_source",
      "source_role": "source_guard",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/numutils.c",
      "sha256": "9018d559d8a2b04f6d3fa8fedeb754fc5f1f8cd8594292e6adc5108e8f97f1bf",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/numutils.c#L603-L612",
      "lines": "603-612"
    },
    {
      "id": "src.path.numeric-format",
      "kind": "upstream_source",
      "source_role": "source_guard",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/numeric.c",
      "sha256": "6cde7cd60b3330b83be35d1f014045f5fb5fe737f3c5db4c8ed4080b99f2b666",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/numeric.c#L3765-L3769",
      "lines": "3765-3769"
    },
    {
      "id": "src.path.width-bucket",
      "kind": "upstream_source",
      "source_role": "source_guard",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/numeric.c",
      "sha256": "6cde7cd60b3330b83be35d1f014045f5fb5fe737f3c5db4c8ed4080b99f2b666",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/numeric.c#L2042-L2046",
      "lines": "2042-2046"
    },
    {
      "id": "snippet-registry.22003",
      "kind": "local_artifact",
      "source_role": "runtime_input",
      "sha256": "6b32f84593ac976a3a39460cd680f9b64bbfd0c62caf1a32b26a561f38a07f2e"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "22003 is numeric_value_out_of_range in SQLSTATE Class 22.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read fixed definition."
    },
    {
      "id": "mechanism.integer-input",
      "statement": "The integer input routine reports 22003 when a parsed value exceeds the int32 range, with the value and target type in the primary message.",
      "sources": [
        "src.path.integer-input"
      ],
      "method": "Read numutils.c out_of_range branch.",
      "limits": "This is the selected runtime path; other integer widths have their own input functions."
    },
    {
      "id": "mechanism.numeric-format",
      "statement": "The numeric factorial path reports 22003 when the result would overflow the numeric format.",
      "sources": [
        "src.path.numeric-format"
      ],
      "method": "Read numeric.c overflow guard.",
      "limits": "This message is not the same as an integer cast failure."
    },
    {
      "id": "mechanism.subsystem",
      "statement": "Other numeric operations such as width_bucket can use a shorter integer-out-of-range message under the same SQLSTATE.",
      "sources": [
        "src.path.width-bucket"
      ],
      "method": "Read the complete conversion guard.",
      "limits": "The primary message and source object are required to identify the repair."
    },
    {
      "id": "history",
      "statement": "The locked catalogue records 22003 from 7.4 without proving an exact implementation introduction date.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Use catalogue boundary."
    },
    {
      "id": "runtime.observation",
      "statement": "The integer_out_of_range case passed on isolated PostgreSQL 18.6 and 10.21: casting 2147483648 raised 22003, left the autocommit session IDLE, and 2147483647 succeeded.",
      "sources": [
        "manifest.22003",
        "snippet-registry.22003"
      ],
      "method": "Execute the shared registry and inspect selected summaries.",
      "limits": "The observation covers an integer input cast, not the other numeric or subsystem paths.",
      "runtime": [
        "runtime.22003-data1-latest.latest",
        "runtime.22003-data1-pg10.pg10"
      ]
    }
  ],
  "messages": [
    {
      "id": "message.integer",
      "sqlstate": "22003",
      "primary_template": "value \"%s\" is out of range for type %s",
      "severity_source": "ERROR",
      "sources": [
        "src.path.integer-input"
      ]
    },
    {
      "id": "message.numeric",
      "sqlstate": "22003",
      "primary_template": "value overflows numeric format",
      "severity_source": "ERROR",
      "sources": [
        "src.path.numeric-format"
      ]
    },
    {
      "id": "message.width-bucket",
      "sqlstate": "22003",
      "primary_template": "integer out of range",
      "severity_source": "ERROR",
      "sources": [
        "src.path.width-bucket"
      ]
    }
  ],
  "usage_evidence": [
    {
      "scope": "definition",
      "status": "definition_only",
      "evidence_ids": [
        "identity"
      ]
    },
    {
      "scope": "fixed-source-path",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "mechanism.integer-input",
        "mechanism.numeric-format",
        "mechanism.subsystem"
      ]
    },
    {
      "scope": "history",
      "status": "unknown",
      "evidence_ids": [
        "history"
      ]
    },
    {
      "scope": "selected-integer-18.6-and-10.21",
      "status": "observed_runtime",
      "evidence_ids": [
        "runtime.observation",
        "runtime.22003-data1-latest.latest",
        "runtime.22003-data1-pg10.pg10"
      ]
    }
  ],
  "runtime": [
    {
      "id": "runtime.22003-data1-latest.latest",
      "run_id": "22003-data1-latest",
      "target": "latest",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "status": "passed",
      "cases": [
        "integer_out_of_range"
      ],
      "summary_sha256": "b75b028698e01f0a8d2e46c2cdc8eeb82e95d9bc57bcdd6a036874de387ab0b7",
      "raw_sha256": "175423ac2544f055d99352849c7b595f3a7856597282eca042dec0d301f85bb8",
      "snippet_registry": {
        "sha256": "6b32f84593ac976a3a39460cd680f9b64bbfd0c62caf1a32b26a561f38a07f2e"
      },
      "observed": {
        "sqlstate": "22003",
        "status_after_repair": "IDLE"
      }
    },
    {
      "id": "runtime.22003-data1-pg10.pg10",
      "run_id": "22003-data1-pg10",
      "target": "pg10",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "status": "passed",
      "cases": [
        "integer_out_of_range"
      ],
      "summary_sha256": "5ed100d3d0ae588e15638a04477f34541365eaa5832a48b651ad0e3ed7d46a77",
      "raw_sha256": "00cd428c715f1b196579c4529a65e93a2e7967941a51c0c3d05cb981669a666e",
      "snippet_registry": {
        "sha256": "6b32f84593ac976a3a39460cd680f9b64bbfd0c62caf1a32b26a561f38a07f2e"
      },
      "observed": {
        "sqlstate": "22003",
        "status_after_repair": "IDLE"
      }
    }
  ]
}
