{
  "schema": 1,
  "sqlstate": "42P11",
  "condition_name": "invalid_cursor_definition",
  "sources": [
    {
      "id": "src.errcodes.42P11.18.6",
      "kind": "upstream_source",
      "source_role": "condition_definition",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/errcodes.txt",
      "location": "line 392",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L392"
    },
    {
      "id": "src.call.42P11.f167a76e45b0b00652025a79",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/executor/spi.c",
      "location": "lines 1600-1602",
      "sha256": "7244b45f632583c72530832df901b788fe403c8857425dd13edb49d9f84b0c78",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/executor/spi.c#L1600-L1602"
    },
    {
      "id": "src.call.42P11.5f65e5c8b9b4ec55a8f821f9",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/parser/analyze.c",
      "location": "lines 3097-3104",
      "sha256": "98a23a176bbf95155d780b6512118999bc9fa68be8d88f0d013daf2a7512466a",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/parser/analyze.c#L3097-L3104"
    },
    {
      "id": "src.call.42P11.8742e1b79b2e47e0cf489b90",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/parser/analyze.c",
      "location": "lines 3040-3044",
      "sha256": "98a23a176bbf95155d780b6512118999bc9fa68be8d88f0d013daf2a7512466a",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/parser/analyze.c#L3040-L3044"
    },
    {
      "id": "src.call.42P11.option-pair-asensitive",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/parser/analyze.c",
      "location": "lines 3048-3052",
      "sha256": "98a23a176bbf95155d780b6512118999bc9fa68be8d88f0d013daf2a7512466a",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/parser/analyze.c#L3048-L3052"
    },
    {
      "id": "src.calls.REL_18_6.42P11",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    }
  ],
  "claims": [
    {
      "id": "identity.class-and-condition",
      "statement": "42P11 is the invalid_cursor_definition condition in Class 42.",
      "method": "Read fixed REL_18_6 errcodes.txt and locked facts.",
      "limits": "Identity does not enumerate all source branches or client failures.",
      "sources": [
        "src.errcodes.42P11.18.6"
      ]
    },
    {
      "id": "mechanism.selected-source-path",
      "statement": "Selected 18.6 paths separate an SPI plan with more than one query, conflicting SCROLL/NO SCROLL or ASENSITIVE/INSENSITIVE options, and an INSENSITIVE cursor combined with a row-locking clause; the latter reports that insensitive cursors must be READ ONLY.",
      "method": "Read selected resolved REL_18_6 report groups and message roles.",
      "limits": "Representative confirmed core paths only; not exhaustive historical or extension coverage.",
      "sources": [
        "src.call.42P11.f167a76e45b0b00652025a79",
        "src.call.42P11.5f65e5c8b9b4ec55a8f821f9",
        "src.call.42P11.8742e1b79b2e47e0cf489b90"
      ]
    },
    {
      "id": "versions.catalogue-boundary",
      "statement": "Locked catalogue snapshots show this condition by PostgreSQL 7.4; source behavior here is fixed at PostgreSQL 18.6.",
      "method": "Read locked catalogue facts and definition snapshot.",
      "limits": "First observed release is a lower bound, not precise behavioral introduction.",
      "sources": [
        "src.errcodes.42P11.18.6"
      ]
    }
  ],
  "messages": [
    {
      "id": "message.variant-1",
      "sqlstate": "42P11",
      "severity_source": "ERROR",
      "primary_template": "cannot open multi-query plan as cursor",
      "detail_templates": [],
      "hint_templates": [],
      "roles": [
        {
          "role": "errmsg",
          "template": "cannot open multi-query plan as cursor"
        }
      ],
      "sources": [
        "src.call.42P11.f167a76e45b0b00652025a79"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-2",
      "sqlstate": "42P11",
      "severity_source": "ERROR",
      "primary_template": "DECLARE INSENSITIVE CURSOR ... %s is not valid",
      "detail_templates": [
        "Insensitive cursors must be READ ONLY."
      ],
      "hint_templates": [],
      "roles": [
        {
          "role": "errmsg",
          "template": "DECLARE INSENSITIVE CURSOR ... %s is not valid"
        },
        {
          "role": "errdetail",
          "template": "Insensitive cursors must be READ ONLY."
        }
      ],
      "sources": [
        "src.call.42P11.5f65e5c8b9b4ec55a8f821f9"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-3",
      "sqlstate": "42P11",
      "severity_source": "ERROR",
      "primary_template": "cannot specify both %s and %s",
      "detail_templates": [],
      "hint_templates": [],
      "roles": [
        {
          "role": "errmsg",
          "template": "cannot specify both %s and %s"
        }
      ],
      "sources": [
        "src.call.42P11.8742e1b79b2e47e0cf489b90",
        "src.call.42P11.option-pair-asensitive"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    }
  ],
  "usage_evidence": [
    {
      "scope": "SQLSTATE definition and release identity",
      "status": "definition_only",
      "evidence_ids": [
        "identity.class-and-condition",
        "src.errcodes.42P11.18.6"
      ]
    },
    {
      "scope": "Selected PostgreSQL 18.6 source emitters and message roles",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "mechanism.selected-source-path"
      ]
    },
    {
      "scope": "Natural runtime execution for this batch",
      "status": "unknown",
      "evidence_ids": []
    }
  ],
  "runtime": []
}
