{
  "schema": 1,
  "sqlstate": "26000",
  "condition_name": "invalid_sql_statement_name",
  "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"
    },
    {
      "id": "src.calls.REL_18_6",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    },
    {
      "id": "src.prepare.18.6",
      "kind": "upstream_source",
      "source_role": "source_path",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/prepare.c",
      "sha256": "e37fbd5f7618e5554561d9293d8c3af7cf3190c62c5c6bbceb3fe8b97be17956",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/prepare.c#L451-L454"
    },
    {
      "id": "src.postgres.18.6",
      "kind": "upstream_source",
      "source_role": "source_path",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/tcop/postgres.c",
      "sha256": "9fb62275b1badf94d01ab351337b60410cd9b3ab1fe63fa9f23d6d2185a21061",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L1670-L1672"
    },
    {
      "id": "doc.prepare.18.6",
      "kind": "upstream_source",
      "source_role": "official_documentation",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "doc/src/sgml/ref/prepare.sgml",
      "sha256": "0980f4925bdc3df25eaf4ca302b0ec43822731023a646aacebd8b01f69b2be71",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/prepare.sgml",
      "docs_url": "https://www.postgresql.org/docs/18/sql-prepare.html"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "26000 is the invalid_sql_statement_name condition in Class 26.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed errcodes.txt row and macro mapping.",
      "limits": "The definition does not identify which SQL statement resource is missing."
    },
    {
      "id": "server-path",
      "statement": "FetchPreparedStatement emits the source template prepared statement \"%s\" does not exist when a named prepared statement is absent.",
      "sources": [
        "src.prepare.18.6",
        "src.calls.REL_18_6"
      ],
      "method": "Trace ERRCODE_UNDEFINED_PSTATEMENT and errmsg in prepare.c.",
      "limits": "The name is dynamic; this source path is from REL_18_6."
    },
    {
      "id": "unnamed-path",
      "statement": "The fixed postgres.c extended-query path emits unnamed prepared statement does not exist with SQLSTATE 26000 when the unnamed prepared statement is absent.",
      "sources": [
        "src.postgres.18.6",
        "src.calls.REL_18_6"
      ],
      "method": "Trace ERRCODE_UNDEFINED_PSTATEMENT and errmsg in the fixed unnamed-statement protocol path.",
      "limits": "This is a protocol/extended-query path and is not the selected named-statement runtime case; the message has no server-side name substitution."
    },
    {
      "id": "session-scope",
      "statement": "PREPARE creates a session-local named statement; DEALLOCATE removes it, so EXECUTE must run on the same backend where the statement was created.",
      "sources": [
        "doc.prepare.18.6"
      ],
      "method": "Use the fixed PREPARE/EXECUTE documentation and the runner case lifecycle.",
      "limits": "Connection pools can change backend sessions; this is a client/pool condition, not a promise about a particular driver."
    },
    {
      "id": "runtime",
      "statement": "The selected 26000 case passed on PostgreSQL 18.6 and 10.21 with the structured SQLSTATE, transaction-state, and repair assertions recorded in the runtime entries.",
      "sources": [
        "runtime.26000-batch34-latest-20260909.latest",
        "runtime.26000-batch34-pg10-20260909.pg10"
      ],
      "method": "Read the selected runner summaries and raw outputs tied to the shared snippet registry.",
      "limits": "This covers the selected mechanism only, not all source callers or all driver/pool behavior."
    }
  ],
  "messages": [
    {
      "id": "message.prepared-missing",
      "sqlstate": "26000",
      "primary_template": "prepared statement \"%s\" does not exist",
      "severity_source": "ERROR",
      "sources": [
        "src.prepare.18.6"
      ],
      "limits": "The unnamed prepared-statement path has a separate source template."
    },
    {
      "id": "message.unnamed-prepared-missing",
      "sqlstate": "26000",
      "primary_template": "unnamed prepared statement does not exist",
      "severity_source": "ERROR",
      "sources": [
        "src.postgres.18.6"
      ],
      "limits": "This fixed protocol path has no server-side statement-name substitution."
    }
  ],
  "usage_evidence": [
    {
      "scope": "26000-runtime",
      "status": "observed_runtime",
      "evidence_ids": [
        "runtime",
        "runtime.26000-batch34-latest-20260909.latest",
        "runtime.26000-batch34-pg10-20260909.pg10"
      ]
    },
    {
      "scope": "condition-and-source-paths",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "identity",
        "server-path",
        "session-scope",
        "unnamed-path"
      ]
    }
  ],
  "runtime": [
    {
      "id": "runtime.26000-batch34-latest-20260909.latest",
      "run_id": "26000-batch34-latest-20260909",
      "target": "latest",
      "server_version": "18.6 (Homebrew)",
      "status": "passed",
      "cases": [
        "prepared_statement_recovery"
      ],
      "summary_sha256": "e6392b850858519b83a78884e27ba0e18c3f024b262549c1a63bc45648bc3265",
      "raw_sha256": "abdac32a6667920c0106f2bbd141bf47bb2614a0477a4e6a4322de13242a44ef",
      "case_manifest": {
        "sha256": "8a93385404eaff2506cf2da0c35e4c079b0f2a5750445fd5f2bc42130b54a6ca"
      },
      "observed": {
        "sqlstate": "26000",
        "primary": "prepared statement \"prepared_recovery_a347d8\" does not exist",
        "severity": "ERROR",
        "statuses": {
          "after_missing": "IDLE",
          "after_recreate": "IDLE"
        },
        "repair": {
          "values": {
            "after_recreate": 2,
            "before_deallocate": 2
          }
        },
        "connection_autocommit": true
      },
      "snippet_registry": {
        "sha256": "b9fdbb48371e0d9902cb9e055ececc4878c38422773a8a1571651d9952809032"
      }
    },
    {
      "id": "runtime.26000-batch34-pg10-20260909.pg10",
      "run_id": "26000-batch34-pg10-20260909",
      "target": "pg10",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "status": "passed",
      "cases": [
        "prepared_statement_recovery"
      ],
      "summary_sha256": "ae189293998b2d4d288658165f9ee288a89baef4227910e5c9aaec09d3a42099",
      "raw_sha256": "7dd35033652b224890790b92dffbfb00dce8f51e4e479fbfcd1590473b508f83",
      "case_manifest": {
        "sha256": "8a93385404eaff2506cf2da0c35e4c079b0f2a5750445fd5f2bc42130b54a6ca"
      },
      "observed": {
        "sqlstate": "26000",
        "primary": "prepared statement \"prepared_recovery_8e5c66\" does not exist",
        "severity": "ERROR",
        "statuses": {
          "after_missing": "IDLE",
          "after_recreate": "IDLE"
        },
        "repair": {
          "values": {
            "after_recreate": 2,
            "before_deallocate": 2
          }
        },
        "connection_autocommit": true
      },
      "snippet_registry": {
        "sha256": "b9fdbb48371e0d9902cb9e055ececc4878c38422773a8a1571651d9952809032"
      }
    }
  ]
}
