{
  "schema": 1,
  "sqlstate": "HV00Q",
  "condition_name": "fdw_schema_not_found",
  "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.postgres_fdw.main.18.6",
      "kind": "upstream_source",
      "source_role": "wrapper_implementation",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "contrib/postgres_fdw/postgres_fdw.c",
      "sha256": "5f61f89fc1f9d67a204c47fd993db575b2d619449e5238b536b9fb1877037db6",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/postgres_fdw/postgres_fdw.c"
    },
    {
      "id": "doc.transactions.18",
      "kind": "upstream_source",
      "source_role": "transaction_recovery_documentation",
      "tag": "PG18-docs",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "doc/src/sgml/xact.sgml",
      "sha256": "b48fbe8bd02ce3d1181a350c88c8baa6e11c73edc90a936e77b180daef328c5c",
      "url": "https://www.postgresql.org/docs/18/tutorial-transactions.html"
    },
    {
      "id": "src.calls.REL_18_6",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "HV00Q is fdw_schema_not_found in SQL/MED Class HV.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed definition row and macro."
    },
    {
      "id": "remote-schema-check",
      "statement": "postgres_fdw runs SELECT 1 FROM pg_catalog.pg_namespace WHERE nspname = <remote_schema> on the remote connection and emits HV00Q when that query does not return exactly one row.",
      "sources": [
        "src.postgres_fdw.main.18.6"
      ],
      "method": "Read the fixed remote pg_namespace query and PQntuples result check.",
      "limits": "The check uses the mapped remote connection and an exact nspname comparison; local search_path does not choose the schema. Connection or remote query errors are reported by an earlier path, and later schema/table privileges are separate from this existence check."
    },
    {
      "id": "transaction-boundary",
      "statement": "This source path reports ERROR; in an explicit local transaction, the caller must roll back the failed transaction or roll back to a deliberately established savepoint before sending another command.",
      "sources": [
        "src.postgres_fdw.main.18.6",
        "doc.transactions.18"
      ],
      "method": "Combine the fixed ERROR severity with the PostgreSQL transaction and savepoint recovery documentation.",
      "limits": "No natural postgres_fdw runtime was run in this batch; the transaction guidance is the general ERROR boundary, not a claim about a selected remote topology."
    }
  ],
  "messages": [
    {
      "id": "remote-schema-not-found",
      "sqlstate": "HV00Q",
      "severity": "ERROR",
      "source_ids": [
        "src.postgres_fdw.main.18.6"
      ],
      "path": "contrib/postgres_fdw/postgres_fdw.c:5523-5526",
      "message": "schema \"%s\" is not present on foreign server \"%s\""
    }
  ],
  "usage_evidence": [
    {
      "scope": "confirmed-source-path",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "remote-schema-check",
        "remote-schema-not-found"
      ]
    },
    {
      "scope": "natural-runtime",
      "status": "unknown",
      "evidence_ids": [
        "remote-schema-check"
      ]
    }
  ],
  "runtime": []
}
