{
  "schema": 1,
  "sqlstate": "22036",
  "condition_name": "non_numeric_sql_json_item",
  "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#L221",
      "lines": "221"
    },
    {
      "id": "src.jsonpath.numeric-methods",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/jsonpath_exec.c",
      "sha256": "678cb8947f0b5e6ad14524f1863987ab99641cfb5f81121fc5c5006af0319d02",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/jsonpath_exec.c#L1129",
      "lines": "1129-1588"
    },
    {
      "id": "src.jsonpath.string-method",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/jsonpath_exec.c",
      "sha256": "678cb8947f0b5e6ad14524f1863987ab99641cfb5f81121fc5c5006af0319d02",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/jsonpath_exec.c#L1592",
      "lines": "1592-1647"
    },
    {
      "id": "src.jsonpath.numeric-unary-method",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/jsonpath_exec.c",
      "sha256": "678cb8947f0b5e6ad14524f1863987ab99641cfb5f81121fc5c5006af0319d02",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/jsonpath_exec.c#L2280",
      "lines": "2280-2310"
    },
    {
      "id": "src.jsonpath.context-flags",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/jsonpath_exec.c",
      "sha256": "678cb8947f0b5e6ad14524f1863987ab99641cfb5f81121fc5c5006af0319d02",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/jsonpath_exec.c#L235",
      "lines": "235-249"
    },
    {
      "id": "src.jsonpath.execute-context",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/jsonpath_exec.c",
      "sha256": "678cb8947f0b5e6ad14524f1863987ab99641cfb5f81121fc5c5006af0319d02",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/jsonpath_exec.c#L654",
      "lines": "654-727"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "22036 is non_numeric_sql_json_item in SQLSTATE Class 22.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read fixed definition."
    },
    {
      "id": "resolved-path",
      "statement": "The fixed jsonpath numeric item-method branches dispatch by input type. String inputs for .integer(), .bigint(), .double(), and the string side of .number()/.decimal() use target input or numeric parsing with ErrorSaveContext or an explicit error flag. Existing numeric items use method-specific paths: .number() can keep the numeric value, .integer() and .bigint() use numeric_int4_opt_error/numeric_int8_opt_error, and .decimal() applies its precision/scale typmod. .boolean() accepts a boolean directly, converts numeric input through int4in, and parses strings with parse_bool. Numeric-only methods reject nonnumeric items; .string() accepts boolean, string, numeric, or datetime items. Non-finite values are rejected by the shown numeric/double branches. Source confirmation is not a natural runtime observation.",
      "sources": [
        "src.jsonpath.numeric-methods",
        "src.jsonpath.string-method",
        "src.jsonpath.numeric-unary-method",
        "src.jsonpath.context-flags",
        "src.jsonpath.execute-context"
      ],
      "method": "Read the complete representative numeric, string, and unary numeric item-method guards.",
      "limits": "Source confirmation is not a natural runtime observation."
    },
    {
      "id": "history",
      "statement": "The locked catalogue records 22036 from 12.0 without proving exact implementation introduction.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Use catalogue boundary."
    }
  ],
  "messages": [
    {
      "id": "message.numeric-only",
      "sqlstate": "22036",
      "primary_template": "jsonpath item method .%s() can only be applied to a numeric value",
      "severity_source": "ERROR",
      "sources": [
        "src.jsonpath.numeric-unary-method"
      ]
    },
    {
      "id": "message.string-or-numeric",
      "sqlstate": "22036",
      "primary_template": "jsonpath item method .%s() can only be applied to a string or numeric value",
      "severity_source": "ERROR",
      "sources": [
        "src.jsonpath.numeric-methods"
      ]
    },
    {
      "id": "message.boolean-method",
      "sqlstate": "22036",
      "primary_template": "jsonpath item method .%s() can only be applied to a boolean, string, or numeric value",
      "severity_source": "ERROR",
      "sources": [
        "src.jsonpath.numeric-methods"
      ]
    },
    {
      "id": "message.invalid-type",
      "sqlstate": "22036",
      "primary_template": "argument \"%s\" of jsonpath item method .%s() is invalid for type %s",
      "severity_source": "ERROR",
      "sources": [
        "src.jsonpath.numeric-methods"
      ]
    },
    {
      "id": "message.nan-infinity",
      "sqlstate": "22036",
      "primary_template": "NaN or Infinity is not allowed for jsonpath item method .%s()",
      "severity_source": "ERROR",
      "sources": [
        "src.jsonpath.numeric-methods"
      ]
    },
    {
      "id": "message.string-method",
      "sqlstate": "22036",
      "primary_template": "jsonpath item method .%s() can only be applied to a boolean, string, numeric, or datetime value",
      "severity_source": "ERROR",
      "sources": [
        "src.jsonpath.string-method"
      ]
    }
  ],
  "usage_evidence": [
    {
      "scope": "definition",
      "status": "definition_only",
      "evidence_ids": [
        "identity"
      ]
    },
    {
      "scope": "fixed-source-path",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "resolved-path"
      ]
    },
    {
      "scope": "history",
      "status": "unknown",
      "evidence_ids": [
        "history"
      ]
    },
    {
      "scope": "natural-runtime",
      "status": "unknown",
      "evidence_ids": [
        "resolved-path"
      ]
    }
  ],
  "runtime": []
}
