{
  "schema": 1,
  "sqlstate": "42P07",
  "condition_name": "duplicate_table",
  "sources": [
    {
      "id": "src.errcodes.42P07.18.6",
      "kind": "upstream_source",
      "source_role": "condition_definition",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/errcodes.txt",
      "location": "line 383",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L383"
    },
    {
      "id": "src.call.42P07.694fcfd426e95ce13263fb9a",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/catalog/heap.c",
      "location": "lines 1194-1196",
      "sha256": "e720ee58279590793edd0985b3c910970ef56e7361b8ef92e245370587e02a0e",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/heap.c#L1194-L1196"
    },
    {
      "id": "src.call.42P07.38d8697cf62c00c05657a6d4",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/catalog/index.c",
      "location": "lines 898-901",
      "sha256": "98a4156a5c21ae856a3b583b633cdeb578a5b69910386c9f166d69fcb04ba2d0",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/index.c#L898-L901"
    },
    {
      "id": "src.call.42P07.index-if-not-exists-guard",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/catalog/index.c",
      "location": "lines 894-903",
      "sha256": "98a4156a5c21ae856a3b583b633cdeb578a5b69910386c9f166d69fcb04ba2d0",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/index.c#L894-L903"
    },
    {
      "id": "src.call.42P07.30cb2a5359e1ec4bea60a466",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/tablecmds.c",
      "location": "lines 875-878",
      "sha256": "422dc8e833df4940755973c757e338295822ba3e4c7266c40669f49f96eb15a9",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablecmds.c#L875-L878"
    },
    {
      "id": "src.call.42P07.19ee2522385544dc7ceb62bb",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/tablecmds.c",
      "location": "lines 17376-17381",
      "sha256": "422dc8e833df4940755973c757e338295822ba3e4c7266c40669f49f96eb15a9",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablecmds.c#L17376-L17381"
    },
    {
      "id": "src.calls.REL_18_6.42P07",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    }
  ],
  "claims": [
    {
      "id": "identity.class-and-condition",
      "statement": "42P07 is the duplicate_table 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.42P07.18.6"
      ]
    },
    {
      "id": "mechanism.selected-source-path",
      "statement": "Core 18.6 paths use the shared pg_class relation namespace for table, sequence, index, and CREATE TABLE AS name collisions. The index IF NOT EXISTS guard reports NOTICE `relation \"%s\" already exists, skipping` and returns on a name hit without definition comparison. Inheritance uses the code for repeated parents and for `circular inheritance not allowed` with DETAIL `\"%s\" is already a child of \"%s\".`",
      "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.42P07.694fcfd426e95ce13263fb9a",
        "src.call.42P07.38d8697cf62c00c05657a6d4",
        "src.call.42P07.index-if-not-exists-guard",
        "src.call.42P07.30cb2a5359e1ec4bea60a466",
        "src.call.42P07.19ee2522385544dc7ceb62bb"
      ]
    },
    {
      "id": "versions.catalogue-boundary",
      "statement": "From 7.4 through 18.6 and 19beta3; this catalogue range is not a precise introduction claim. The selected source covers relation lookup, index IF NOT EXISTS, repeated inheritance parents, and circularity; 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.42P07.18.6"
      ]
    }
  ],
  "messages": [
    {
      "id": "message.variant-1",
      "sqlstate": "42P07",
      "severity_source": "explicit ERROR",
      "primary_template": "relation \"%s\" already exists",
      "detail_templates": [],
      "hint_templates": [],
      "roles": [
        {
          "role": "errmsg",
          "template": "relation \"%s\" already exists"
        }
      ],
      "sources": [
        "src.call.42P07.694fcfd426e95ce13263fb9a"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-2",
      "sqlstate": "42P07",
      "severity_source": "explicit NOTICE",
      "primary_template": "relation \"%s\" already exists, skipping",
      "detail_templates": [],
      "hint_templates": [],
      "roles": [
        {
          "role": "errmsg",
          "template": "relation \"%s\" already exists, skipping"
        }
      ],
      "sources": [
        "src.call.42P07.38d8697cf62c00c05657a6d4"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-3",
      "sqlstate": "42P07",
      "severity_source": "explicit ERROR",
      "primary_template": "relation \"%s\" would be inherited from more than once",
      "detail_templates": [],
      "hint_templates": [],
      "roles": [
        {
          "role": "errmsg",
          "template": "relation \"%s\" would be inherited from more than once"
        }
      ],
      "sources": [
        "src.call.42P07.30cb2a5359e1ec4bea60a466"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-4",
      "sqlstate": "42P07",
      "severity_source": "explicit ERROR",
      "primary_template": "circular inheritance not allowed",
      "detail_templates": [
        "\"%s\" is already a child of \"%s\"."
      ],
      "hint_templates": [],
      "roles": [
        {
          "role": "errmsg",
          "template": "circular inheritance not allowed"
        },
        {
          "role": "errdetail",
          "template": "\"%s\" is already a child of \"%s\"."
        }
      ],
      "sources": [
        "src.call.42P07.19ee2522385544dc7ceb62bb"
      ],
      "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.42P07.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": []
}
