{
  "schema": 1,
  "sqlstate": "42P01",
  "condition_name": "undefined_table",
  "sources": [
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "src.errcodes.18.6",
      "location": "lines 372-378",
      "path": "src/backend/utils/errcodes.txt",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "tag": "REL_18_6",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "src.parse-relation.18.6",
      "location": "lines 1473-1501",
      "path": "src/backend/parser/parse_relation.c",
      "sha256": "0d9c88f4a8def4c2d982c33f13208590e21ecf5e6f8cd9d7faa223dc771c9a9a",
      "tag": "REL_18_6",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/parser/parse_relation.c#L1473-L1501"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "src.namespace.18.6",
      "location": "lines 626-640",
      "path": "src/backend/catalog/namespace.c",
      "sha256": "8c9e6a99e84fa2cec8a9b1de2ecbe3966a13f4ad68c6ccfbfb8134a754d73e56",
      "tag": "REL_18_6",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/namespace.c#L626-L640"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "doc.ddl.18.6",
      "location": "schemas, search_path, and namespace resolution",
      "path": "doc/src/sgml/ddl.sgml",
      "sha256": "ce1919d9236f2e71672660e1a347146472e966e4d19b77fde5ae345dd1db6ec7",
      "tag": "PG18-docs",
      "url": "https://www.postgresql.org/docs/18/ddl-schemas.html"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "doc.protocol.18",
      "location": "ErrorResponse fields",
      "path": "doc/src/sgml/protocol.sgml",
      "sha256": "745339e07ebbc2bb67d98b258e25772ada644ef26011e3cd6b3fcbb435235f89",
      "tag": "PG18-docs",
      "url": "https://www.postgresql.org/docs/18/protocol-error-fields.html"
    },
    {
      "id": "manifest.42P01",
      "kind": "local_artifact",
      "location": "snapshots and definition_blobs entries for the 42P01 definition",
      "sha256": "1727a275f336988ff96b4f9990a4ca253080f73fc5d316e7def165c8cf3708a8"
    },
    {
      "id": "case-manifest.42P01",
      "kind": "local_artifact",
      "location": "missing_relation",
      "sha256": "d0bd0702654b03dce66b733f5e4660b643db270682616c5927c9b10a12327088"
    },
    {
      "id": "snippet-registry.42P01.final",
      "kind": "local_artifact",
      "location": "missing_relation ordered SQL",
      "sha256": "f4eb28d6bc0d0d250d5dc548ed83a0783538eb73a07ab8b3670f218bcc21aba5"
    }
  ],
  "claims": [
    {
      "id": "identity.class-and-condition",
      "limits": "The historical condition name covers relation lookup failures beyond a literal table.",
      "method": "Read the Class 42 section and 42P01 row in the frozen errcodes.txt snapshot.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "statement": "42P01 is the undefined_table condition in Class 42 syntax_error_or_access_rule_violation."
    },
    {
      "id": "mechanism.relation-lookup",
      "limits": "The displayed relation name depends on qualification, search_path, quoting, and the parse context.",
      "method": "Trace namespace.c lookup and parserOpenTable qualified and unqualified error branches in the fixed source, then check the protocol field reference.",
      "sources": [
        "src.namespace.18.6",
        "src.parse-relation.18.6",
        "doc.ddl.18.6",
        "doc.protocol.18"
      ],
      "statement": "The parser reports ERRCODE_UNDEFINED_TABLE with relation \"%s.%s\" does not exist for a qualified relation and relation \"%s\" does not exist for an unqualified relation."
    },
    {
      "id": "runtime.missing-relation-recovery",
      "limits": "This case does not distinguish migration races, search_path changes, permissions, or all relation kinds.",
      "method": "Execute the missing query, inspect diagnostics and status, create the schema-qualified relation, and assert a valid follow-up query.",
      "sources": [
        "case-manifest.42P01",
        "snippet-registry.42P01.final",
        "runtime.42P01-registry-final-20260909.latest",
        "runtime.42P01-registry-final-20260909.pg10"
      ],
      "statement": "A missing relation query returned SQLSTATE 42P01 while autocommit remained IDLE; creating the intended relation and querying it returned count 0 on both targets."
    },
    {
      "id": "versions.catalogue-boundary",
      "limits": "The first scanned release is a lower bound, not an asserted introduction version.",
      "method": "Read the manifest snapshots and definition references for the code.",
      "sources": [
        "manifest.42P01"
      ],
      "statement": "The locked catalogue records 42P01 in every listed formal snapshot from 9.0.23 through 18.6 and in 19beta3; pre-9.0 history is not scanned."
    }
  ],
  "messages": [
    {
      "id": "message.qualified-relation",
      "limits": "The qualified form is selected when the parser has a schema-qualified relation reference.",
      "primary_template": "relation \"%s.%s\" does not exist",
      "severity_source": "explicit ERROR",
      "sources": [
        "src.parse-relation.18.6"
      ],
      "sqlstate": "42P01"
    },
    {
      "id": "message.unqualified-relation",
      "limits": "The unqualified form is selected when lookup through the active namespace fails.",
      "primary_template": "relation \"%s\" does not exist",
      "severity_source": "explicit ERROR",
      "sources": [
        "src.parse-relation.18.6"
      ],
      "sqlstate": "42P01"
    }
  ],
  "usage_evidence": [
    {
      "evidence_ids": [
        "identity.class-and-condition",
        "src.errcodes.18.6"
      ],
      "scope": "SQLSTATE directory identity",
      "status": "definition_only"
    },
    {
      "evidence_ids": [
        "mechanism.relation-lookup",
        "message.qualified-relation",
        "message.unqualified-relation",
        "src.namespace.18.6",
        "src.parse-relation.18.6",
        "doc.ddl.18.6",
        "doc.protocol.18"
      ],
      "scope": "Qualified and unqualified parser relation messages",
      "status": "source_path_confirmed"
    },
    {
      "evidence_ids": [
        "runtime.missing-relation-recovery",
        "snippet-registry.42P01.final",
        "runtime.42P01-registry-final-20260909.latest",
        "runtime.42P01-registry-final-20260909.pg10"
      ],
      "scope": "Missing relation diagnostic and corrected follow-up",
      "status": "observed_runtime"
    },
    {
      "evidence_ids": [
        "versions.catalogue-boundary",
        "manifest.42P01"
      ],
      "scope": "Version presence",
      "status": "definition_only"
    }
  ],
  "runtime": [
    {
      "cases": [
        "missing_relation"
      ],
      "id": "runtime.42P01-registry-final-20260909.latest",
      "observed": {
        "diagnostic": {
          "message_primary": "relation \"c42p01_missing_relation.does_not_exist\" does not exist",
          "severity": "ERROR",
          "source_file": "parse_relation.c",
          "source_function": "parserOpenTable",
          "source_line": "1480",
          "sqlstate": "42P01"
        },
        "statuses": {
          "after_error": "IDLE",
          "after_valid_query": "IDLE"
        },
        "valid_count": 0
      },
      "raw_sha256": "c65e0596cb51d32791448e493b01de0bfda519bb35ed5d1153f07c156bd617ac",
      "run_id": "42P01-registry-final-20260909",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "snippet_registry": {
        "sha256": "f4eb28d6bc0d0d250d5dc548ed83a0783538eb73a07ab8b3670f218bcc21aba5"
      },
      "status": "passed",
      "summary_sha256": "2b61950cb5a1a8f42fe130f2ad8407cb7cbaf4dfb396481fdf88d0d5769e3e37",
      "target": "latest"
    },
    {
      "cases": [
        "missing_relation"
      ],
      "id": "runtime.42P01-registry-final-20260909.pg10",
      "image": "postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
      "observed": {
        "diagnostic": {
          "message_primary": "relation \"c42p01_missing_relation.does_not_exist\" does not exist",
          "severity": "ERROR",
          "source_file": "parse_relation.c",
          "source_function": "parserOpenTable",
          "source_line": "1159",
          "sqlstate": "42P01"
        },
        "statuses": {
          "after_error": "IDLE",
          "after_valid_query": "IDLE"
        },
        "valid_count": 0
      },
      "raw_sha256": "da4b4fcbbff2d04b8a03d0b7718cfe8b1954439f3bf3125cd8b79eaa88eeed79",
      "run_id": "42P01-registry-final-20260909",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "snippet_registry": {
        "sha256": "f4eb28d6bc0d0d250d5dc548ed83a0783538eb73a07ab8b3670f218bcc21aba5"
      },
      "status": "passed",
      "summary_sha256": "3049254a6a818ed4401abdaee428fee0f17c4d6e299a4353e880ad6fe37a38d9",
      "target": "pg10"
    }
  ]
}
