{
  "schema": 1,
  "sqlstate": "42P16",
  "condition_name": "invalid_table_definition",
  "sources": [
    {
      "id": "src.errcodes.42P16.18.6",
      "kind": "upstream_source",
      "source_role": "condition_definition",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/errcodes.txt",
      "location": "line 397",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L397"
    },
    {
      "id": "src.call.42P16.af3eab51674420e4a935dec6",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/catalog/heap.c",
      "location": "lines 576-580",
      "sha256": "e720ee58279590793edd0985b3c910970ef56e7361b8ef92e245370587e02a0e",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/heap.c#L576-L580"
    },
    {
      "id": "src.call.42P16.ba3688fe3791594da97fde08",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/catalog/heap.c",
      "location": "lines 697-702",
      "sha256": "e720ee58279590793edd0985b3c910970ef56e7361b8ef92e245370587e02a0e",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/heap.c#L697-L702"
    },
    {
      "id": "src.call.42P16.ca2b8fc15fc050d4a6cd2d3b",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/catalog/index.c",
      "location": "lines 218-221",
      "sha256": "98a4156a5c21ae856a3b583b633cdeb578a5b69910386c9f166d69fcb04ba2d0",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/index.c#L218-L221"
    },
    {
      "id": "src.calls.REL_18_6.42P16",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    }
  ],
  "claims": [
    {
      "id": "identity.class-and-condition",
      "statement": "42P16 is the invalid_table_definition 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.42P16.18.6"
      ]
    },
    {
      "id": "mechanism.selected-source-path",
      "statement": "Table-definition checks use this condition for several relation-shape violations. Core 18.6 examples reject pseudo-types in partition keys, missing collation for a collatable partition key, and multiple primary keys.",
      "method": "Read selected resolved REL_18_6 report groups and message roles.",
      "limits": "Representative confirmed core paths only; not exhaustive historical or extension coverage.",
      "sources": [
        "src.call.42P16.af3eab51674420e4a935dec6",
        "src.call.42P16.ba3688fe3791594da97fde08",
        "src.call.42P16.ca2b8fc15fc050d4a6cd2d3b"
      ]
    },
    {
      "id": "versions.catalogue-boundary",
      "statement": "Locked catalogue snapshots show this condition by PostgreSQL 7.4; source behavior here is fixed at PostgreSQL 18.6.",
      "method": "Read locked catalogue facts and definition snapshot.",
      "limits": "First observed release is a lower bound, not precise behavioral introduction.",
      "sources": [
        "src.errcodes.42P16.18.6"
      ]
    }
  ],
  "messages": [
    {
      "id": "message.variant-1",
      "sqlstate": "42P16",
      "severity_source": "ERROR",
      "primary_template": "partition key column %s has pseudo-type %s",
      "detail_templates": [],
      "hint_templates": [],
      "roles": [
        {
          "role": "errmsg",
          "template": "partition key column %s has pseudo-type %s"
        }
      ],
      "sources": [
        "src.call.42P16.af3eab51674420e4a935dec6"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-2",
      "sqlstate": "42P16",
      "severity_source": "ERROR",
      "primary_template": "no collation was derived for partition key column %s with collatable type %s",
      "detail_templates": [],
      "hint_templates": [
        "Use the COLLATE clause to set the collation explicitly."
      ],
      "roles": [
        {
          "role": "errmsg",
          "template": "no collation was derived for partition key column %s with collatable type %s"
        },
        {
          "role": "errhint",
          "template": "Use the COLLATE clause to set the collation explicitly."
        }
      ],
      "sources": [
        "src.call.42P16.ba3688fe3791594da97fde08"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-3",
      "sqlstate": "42P16",
      "severity_source": "ERROR",
      "primary_template": "multiple primary keys for table \"%s\" are not allowed",
      "detail_templates": [],
      "hint_templates": [],
      "roles": [
        {
          "role": "errmsg",
          "template": "multiple primary keys for table \"%s\" are not allowed"
        }
      ],
      "sources": [
        "src.call.42P16.ca2b8fc15fc050d4a6cd2d3b"
      ],
      "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.42P16.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": []
}
