{
  "schema": 1,
  "sqlstate": "22034",
  "condition_name": "more_than_one_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#L219",
      "lines": "219"
    },
    {
      "id": "src.path.0",
      "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#L3966",
      "lines": "3966-3970"
    },
    {
      "id": "src.jsonpath.cardinality",
      "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#L3880",
      "lines": "3880-4070"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "22034 is more_than_one_sql_json_item in SQLSTATE Class 22.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read fixed definition."
    },
    {
      "id": "resolved-path",
      "statement": "The fixed JSON_QUERY path collects the complete SQL/JSON result list, uses the wrapper mode to permit multiple items, and emits 22034 only when more than one item remains without a wrapper; JSON_VALUE uses the same code for more than one item, while a single non-scalar is the separate 2203F condition.",
      "sources": [
        "src.path.0",
        "src.jsonpath.cardinality"
      ],
      "method": "Read JsonPathQuery and JsonPathValue cardinality, wrapper, and scalar guards.",
      "limits": "Source confirmation is not a natural runtime observation."
    },
    {
      "id": "history",
      "statement": "The locked catalogue records 22034 from 12.0 without proving exact implementation introduction.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Use catalogue boundary."
    }
  ],
  "messages": [
    {
      "id": "message.0",
      "sqlstate": "22034",
      "primary_template": "JSON path expression for column \"%s\" must return single item when no wrapper is requested",
      "severity_source": "ERROR",
      "sources": [
        "src.path.0"
      ],
      "hint_template": "Use the WITH WRAPPER clause to wrap SQL/JSON items into an array."
    },
    {
      "id": "message.json-query",
      "sqlstate": "22034",
      "primary_template": "JSON path expression in JSON_QUERY must return single item when no wrapper is requested",
      "severity_source": "ERROR",
      "hint_template": "Use the WITH WRAPPER clause to wrap SQL/JSON items into an array.",
      "sources": [
        "src.jsonpath.cardinality"
      ]
    },
    {
      "id": "message.json-value",
      "sqlstate": "22034",
      "primary_template": "JSON path expression in JSON_VALUE must return single scalar item",
      "severity_source": "ERROR",
      "sources": [
        "src.jsonpath.cardinality"
      ]
    }
  ],
  "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": []
}
