{
  "schema": 1,
  "sqlstate": "22013",
  "condition_name": "invalid_preceding_or_following_size",
  "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#L183",
      "lines": "183"
    },
    {
      "id": "src.window-executor.18.6",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/executor/nodeWindowAgg.c",
      "sha256": "c365e6750bc77a89562254903d099c3e5914e001d3aae418322ccffc1d535d17",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/executor/nodeWindowAgg.c#L2144-2210",
      "lines": "2144-2210"
    },
    {
      "id": "src.range-int8.18.6",
      "kind": "upstream_source",
      "source_role": "resolved_range_guard",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/int8.c",
      "sha256": "da4d3688c0b037346f25419ea31020af9fec54021f182370234dcbf70b748f36",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/int8.c#L400-420",
      "lines": "400-420"
    },
    {
      "id": "src.range-numeric.18.6",
      "kind": "upstream_source",
      "source_role": "resolved_range_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#L2690-2715",
      "lines": "2690-2715"
    },
    {
      "id": "src.range-float.18.6",
      "kind": "upstream_source",
      "source_role": "resolved_range_guard",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/float.c",
      "sha256": "58914ae93c06c281e581a4bb2dcf2280e4ae1619f3ceb8f801f50beca87eecd8",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/float.c#L1105-1125",
      "lines": "1105-1125"
    },
    {
      "id": "src.range-timestamp.18.6",
      "kind": "upstream_source",
      "source_role": "resolved_range_guard",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/timestamp.c",
      "sha256": "2614ccd2182fa904b4cac9bef43039e90a1af578d2d1c6803d49a07420d168f2",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/timestamp.c#L3860-3885",
      "lines": "3860-3885"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "22013 is invalid_preceding_or_following_size in SQLSTATE Class 22.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed errcodes row and macro."
    },
    {
      "id": "resolved-rows-groups-path",
      "statement": "The window executor rejects negative ROWS/GROUPS start or end offsets with endpoint-specific 22013 primaries; NULL endpoints use 22004.",
      "sources": [
        "src.window-executor.18.6"
      ],
      "method": "Read the complete calculate_frame_offsets branches.",
      "limits": "This source path is limited to ROWS/GROUPS."
    },
    {
      "id": "resolved-range-path",
      "statement": "Representative RANGE in_range helpers reject negative integer or interval offsets and reject the specified NaN/negative numeric and float offsets with the generic 22013 primary.",
      "sources": [
        "src.range-int8.18.6",
        "src.range-numeric.18.6",
        "src.range-float.18.6",
        "src.range-timestamp.18.6"
      ],
      "method": "Read the representative type-specific in_range guards.",
      "limits": "The cited helpers are representative, not an exhaustive list of every range-capable type."
    },
    {
      "id": "history",
      "statement": "The locked catalogue records 22013 from 11.0 without proving an exact implementation introduction date.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Use catalogue presence and history boundaries."
    }
  ],
  "messages": [
    {
      "id": "message.start-negative",
      "sqlstate": "22013",
      "primary_template": "frame starting offset must not be negative",
      "severity_source": "ERROR",
      "sources": [
        "src.window-executor.18.6"
      ]
    },
    {
      "id": "message.end-negative",
      "sqlstate": "22013",
      "primary_template": "frame ending offset must not be negative",
      "severity_source": "ERROR",
      "sources": [
        "src.window-executor.18.6"
      ]
    },
    {
      "id": "message.range-generic",
      "sqlstate": "22013",
      "primary_template": "invalid preceding or following size in window function",
      "severity_source": "ERROR",
      "sources": [
        "src.range-int8.18.6",
        "src.range-numeric.18.6",
        "src.range-float.18.6",
        "src.range-timestamp.18.6"
      ]
    }
  ],
  "usage_evidence": [
    {
      "scope": "definition",
      "status": "definition_only",
      "evidence_ids": [
        "identity"
      ]
    },
    {
      "scope": "fixed-source-path",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "resolved-rows-groups-path",
        "resolved-range-path"
      ]
    },
    {
      "scope": "history",
      "status": "unknown",
      "evidence_ids": [
        "history"
      ]
    },
    {
      "scope": "natural-runtime",
      "status": "unknown",
      "evidence_ids": [
        "resolved-rows-groups-path",
        "resolved-range-path"
      ]
    }
  ],
  "runtime": []
}
