{
  "schema": 1,
  "sqlstate": "42P09",
  "condition_name": "ambiguous_alias",
  "sources": [
    {
      "id": "src.errcodes.42P09.18.6",
      "kind": "upstream_source",
      "source_role": "condition_definition",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/errcodes.txt",
      "location": "line 389",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L389"
    },
    {
      "id": "src.call.42P09.ed0c1b7f7e4bd90cb2068e17",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/parser/parse_relation.c",
      "location": "lines 224-228",
      "sha256": "0d9c88f4a8def4c2d982c33f13208590e21ecf5e6f8cd9d7faa223dc771c9a9a",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/parser/parse_relation.c#L224-L228"
    },
    {
      "id": "src.call.42P09.171afa1503a4e198e620e1b5",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/parser/parse_relation.c",
      "location": "lines 271-275",
      "sha256": "0d9c88f4a8def4c2d982c33f13208590e21ecf5e6f8cd9d7faa223dc771c9a9a",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/parser/parse_relation.c#L271-L275"
    },
    {
      "id": "src.calls.REL_18_6.42P09",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    }
  ],
  "claims": [
    {
      "id": "identity.class-and-condition",
      "statement": "42P09 is the ambiguous_alias 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.42P09.18.6"
      ]
    },
    {
      "id": "mechanism.selected-source-path",
      "statement": "scanNameSpaceForRefname compares visible aliases and reports `table reference \"%s\" is ambiguous` on a duplicate visible alias; scanNameSpaceForRelid reports `table reference %u is ambiguous` when an unaliased relation RTE with the same OID appears more than once. Lateral-only and column-only visibility guards are applied, and both paths are separate from column ambiguity.",
      "method": "Read complete resolved REL_18_6 report groups and message roles.",
      "limits": "Representative confirmed core paths only; not exhaustive historical or extension coverage.",
      "sources": [
        "src.call.42P09.ed0c1b7f7e4bd90cb2068e17",
        "src.call.42P09.171afa1503a4e198e620e1b5"
      ]
    },
    {
      "id": "versions.catalogue-boundary",
      "statement": "From 7.4 through 18.6 and 19beta3; this catalogue range is not a precise introduction claim. The selected named-alias and internal-OID branches are fixed 18.6 source paths and runtime was not run.",
      "method": "Read locked catalogue facts and definition snapshots.",
      "limits": "First observed release is a lower bound, not precise behavioral introduction.",
      "sources": [
        "src.errcodes.42P09.18.6"
      ]
    }
  ],
  "messages": [
    {
      "id": "message.variant-1",
      "sqlstate": "42P09",
      "severity_source": "explicit ERROR",
      "primary_template": "table reference \"%s\" is ambiguous",
      "detail_templates": [],
      "hint_templates": [],
      "roles": [
        {
          "role": "errmsg",
          "template": "table reference \"%s\" is ambiguous"
        }
      ],
      "sources": [
        "src.call.42P09.ed0c1b7f7e4bd90cb2068e17"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-2",
      "sqlstate": "42P09",
      "severity_source": "explicit ERROR",
      "primary_template": "table reference %u is ambiguous",
      "detail_templates": [],
      "hint_templates": [],
      "roles": [
        {
          "role": "errmsg",
          "template": "table reference %u is ambiguous"
        }
      ],
      "sources": [
        "src.call.42P09.171afa1503a4e198e620e1b5"
      ],
      "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.42P09.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": []
}
