{
  "schema": 1,
  "sqlstate": "42P22",
  "condition_name": "indeterminate_collation",
  "sources": [
    {
      "id": "src.errcodes.42P22.18.6",
      "kind": "upstream_source",
      "source_role": "condition_definition",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/errcodes.txt",
      "location": "line 353",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L353"
    },
    {
      "id": "src.call.42P22.9663977b60d9074ca1246b2e",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/access/hash/hashfunc.c",
      "location": "lines 278-281",
      "sha256": "ada1fcc9863e6f9c91b4aed90c37cbc50717a74a1ebdd050c3eb33db46f24f22",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/hash/hashfunc.c#L278-L281"
    },
    {
      "id": "src.call.42P22.de5cfc36b17b669d27e71821",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/createas.c",
      "location": "lines 198-203",
      "sha256": "f484080c0ec3d303040d94c15817d7dd86aed8e716afd81b45718d4b4443e9c7",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/createas.c#L198-L203"
    },
    {
      "id": "src.call.42P22.9001b972a28a8028eebe7eae",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/indexcmds.c",
      "location": "lines 2105-2108",
      "sha256": "0bdae365f207ab82865806c5983cac94c5c062e7a61ab7c883ccb7e2015fad36",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/indexcmds.c#L2105-L2108"
    },
    {
      "id": "src.call.42P22.b8ebf0f4bd61f9bcbbfdb513",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/tablecmds.c",
      "location": "lines 20041-20044",
      "sha256": "422dc8e833df4940755973c757e338295822ba3e4c7266c40669f49f96eb15a9",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablecmds.c#L20041-L20044"
    },
    {
      "id": "src.call.42P22.fcf0f384dd027c687389c530",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/view.c",
      "location": "lines 76-80",
      "sha256": "53c9efccdefa62fa522cd16315ad925779da1bd76a92324df3ba340c967d953c",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/view.c#L76-L80"
    },
    {
      "id": "src.call.42P22.b60a368090edbb3ad28c2b74",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/regex/regc_pg_locale.c",
      "location": "lines 239-242",
      "sha256": "3dab816f911f623d39966e5b3a8f1d82d4f2ff8b697496d754aba52848c54c4e",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/regex/regc_pg_locale.c#L239-L242"
    },
    {
      "id": "src.call.42P22.584d77b09f81511c429fd3bc",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/formatting.c",
      "location": "lines 1654-1658",
      "sha256": "a22651cc223e93c1879420004027325579fc79a3ba8684408496149164a2220c",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/formatting.c#L1654-L1658"
    },
    {
      "id": "src.call.42P22.c024a0dd3694f6694d2b94fc",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/like.c",
      "location": "lines 160-163",
      "sha256": "7665cf5399a9090f2bd864c7442ae22af68d2bc9368bf06b8ebef48613a1ed08",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/like.c#L160-L163"
    },
    {
      "id": "src.call.42P22.3baebb248e633d9c8e75f53f",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/like.c",
      "location": "lines 191-194",
      "sha256": "7665cf5399a9090f2bd864c7442ae22af68d2bc9368bf06b8ebef48613a1ed08",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/like.c#L191-L194"
    },
    {
      "id": "src.call.42P22.0c130e4570c3138a788409e1",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/varchar.c",
      "location": "lines 735-738",
      "sha256": "aee29b2c745b34a7299d158b8e8c60b2c6c4900a5e3751fd211acea81b431f42",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/varchar.c#L735-L738"
    },
    {
      "id": "src.calls.REL_18_6.42P22",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    }
  ],
  "claims": [
    {
      "id": "identity.class-and-condition",
      "statement": "42P22 is the indeterminate_collation 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.42P22.18.6"
      ]
    },
    {
      "id": "mechanism.selected-source-path",
      "statement": "Selected fixed 18.6 callers raise 42P22 when a required operation has no determinate collation: string hashing or comparison, index or partition expressions, CTAS or view output columns, regular expressions, LIKE or ILIKE, and formatting functions.",
      "method": "Read selected resolved report groups and the surrounding fixed caller guards, preserving each caller-specific primary and COLLATE hint.",
      "limits": "Representative confirmed core paths only; not exhaustive historical or extension coverage.",
      "sources": [
        "src.call.42P22.9663977b60d9074ca1246b2e",
        "src.call.42P22.de5cfc36b17b669d27e71821",
        "src.call.42P22.9001b972a28a8028eebe7eae",
        "src.call.42P22.b8ebf0f4bd61f9bcbbfdb513",
        "src.call.42P22.fcf0f384dd027c687389c530",
        "src.call.42P22.b60a368090edbb3ad28c2b74",
        "src.call.42P22.584d77b09f81511c429fd3bc",
        "src.call.42P22.c024a0dd3694f6694d2b94fc",
        "src.call.42P22.3baebb248e633d9c8e75f53f",
        "src.call.42P22.0c130e4570c3138a788409e1"
      ]
    },
    {
      "id": "boundary.caller-specific-hint",
      "statement": "The fixed callers attach the same explicit-COLLATE hint while naming the operation that lacks a usable collation; the primary message determines which expression or definition boundary to inspect.",
      "method": "Compare the message roles across the selected hash, DDL, regex, pattern, comparison, and formatting report groups.",
      "limits": "Selected message-role comparison only; no runtime execution is claimed.",
      "sources": [
        "src.call.42P22.9663977b60d9074ca1246b2e",
        "src.call.42P22.de5cfc36b17b669d27e71821",
        "src.call.42P22.9001b972a28a8028eebe7eae",
        "src.call.42P22.b8ebf0f4bd61f9bcbbfdb513",
        "src.call.42P22.fcf0f384dd027c687389c530",
        "src.call.42P22.b60a368090edbb3ad28c2b74",
        "src.call.42P22.584d77b09f81511c429fd3bc",
        "src.call.42P22.c024a0dd3694f6694d2b94fc",
        "src.call.42P22.3baebb248e633d9c8e75f53f",
        "src.call.42P22.0c130e4570c3138a788409e1"
      ]
    },
    {
      "id": "versions.catalogue-boundary",
      "statement": "Locked catalogue snapshots show this condition by PostgreSQL 9.1.0; 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.42P22.18.6"
      ]
    }
  ],
  "messages": [
    {
      "id": "message.variant-1",
      "sqlstate": "42P22",
      "severity_source": "ERROR",
      "primary_template": "could not determine which collation to use for string hashing",
      "detail_templates": [],
      "hint_templates": [
        "Use the COLLATE clause to set the collation explicitly."
      ],
      "roles": [
        {
          "role": "errmsg",
          "template": "could not determine which collation to use for string hashing"
        },
        {
          "role": "errhint",
          "template": "Use the COLLATE clause to set the collation explicitly."
        }
      ],
      "sources": [
        "src.call.42P22.9663977b60d9074ca1246b2e"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-2",
      "sqlstate": "42P22",
      "severity_source": "ERROR",
      "primary_template": "no collation was derived for 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 column \"%s\" with collatable type %s"
        },
        {
          "role": "errhint",
          "template": "Use the COLLATE clause to set the collation explicitly."
        }
      ],
      "sources": [
        "src.call.42P22.de5cfc36b17b669d27e71821"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-3",
      "sqlstate": "42P22",
      "severity_source": "ERROR",
      "primary_template": "could not determine which collation to use for index expression",
      "detail_templates": [],
      "hint_templates": [
        "Use the COLLATE clause to set the collation explicitly."
      ],
      "roles": [
        {
          "role": "errmsg",
          "template": "could not determine which collation to use for index expression"
        },
        {
          "role": "errhint",
          "template": "Use the COLLATE clause to set the collation explicitly."
        }
      ],
      "sources": [
        "src.call.42P22.9001b972a28a8028eebe7eae"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-4",
      "sqlstate": "42P22",
      "severity_source": "ERROR",
      "primary_template": "could not determine which collation to use for partition expression",
      "detail_templates": [],
      "hint_templates": [
        "Use the COLLATE clause to set the collation explicitly."
      ],
      "roles": [
        {
          "role": "errmsg",
          "template": "could not determine which collation to use for partition expression"
        },
        {
          "role": "errhint",
          "template": "Use the COLLATE clause to set the collation explicitly."
        }
      ],
      "sources": [
        "src.call.42P22.b8ebf0f4bd61f9bcbbfdb513"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-5",
      "sqlstate": "42P22",
      "severity_source": "ERROR",
      "primary_template": "could not determine which collation to use for view column \"%s\"",
      "detail_templates": [],
      "hint_templates": [
        "Use the COLLATE clause to set the collation explicitly."
      ],
      "roles": [
        {
          "role": "errmsg",
          "template": "could not determine which collation to use for view column \"%s\""
        },
        {
          "role": "errhint",
          "template": "Use the COLLATE clause to set the collation explicitly."
        }
      ],
      "sources": [
        "src.call.42P22.fcf0f384dd027c687389c530"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-6",
      "sqlstate": "42P22",
      "severity_source": "ERROR",
      "primary_template": "could not determine which collation to use for regular expression",
      "detail_templates": [],
      "hint_templates": [
        "Use the COLLATE clause to set the collation explicitly."
      ],
      "roles": [
        {
          "role": "errmsg",
          "template": "could not determine which collation to use for regular expression"
        },
        {
          "role": "errhint",
          "template": "Use the COLLATE clause to set the collation explicitly."
        }
      ],
      "sources": [
        "src.call.42P22.b60a368090edbb3ad28c2b74"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-7",
      "sqlstate": "42P22",
      "severity_source": "ERROR",
      "primary_template": "could not determine which collation to use for %s function",
      "detail_templates": [],
      "hint_templates": [
        "Use the COLLATE clause to set the collation explicitly."
      ],
      "roles": [
        {
          "role": "errmsg",
          "template": "could not determine which collation to use for %s function"
        },
        {
          "role": "errhint",
          "template": "Use the COLLATE clause to set the collation explicitly."
        }
      ],
      "sources": [
        "src.call.42P22.584d77b09f81511c429fd3bc"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-8",
      "sqlstate": "42P22",
      "severity_source": "ERROR",
      "primary_template": "could not determine which collation to use for LIKE",
      "detail_templates": [],
      "hint_templates": [
        "Use the COLLATE clause to set the collation explicitly."
      ],
      "roles": [
        {
          "role": "errmsg",
          "template": "could not determine which collation to use for LIKE"
        },
        {
          "role": "errhint",
          "template": "Use the COLLATE clause to set the collation explicitly."
        }
      ],
      "sources": [
        "src.call.42P22.c024a0dd3694f6694d2b94fc"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-9",
      "sqlstate": "42P22",
      "severity_source": "ERROR",
      "primary_template": "could not determine which collation to use for ILIKE",
      "detail_templates": [],
      "hint_templates": [
        "Use the COLLATE clause to set the collation explicitly."
      ],
      "roles": [
        {
          "role": "errmsg",
          "template": "could not determine which collation to use for ILIKE"
        },
        {
          "role": "errhint",
          "template": "Use the COLLATE clause to set the collation explicitly."
        }
      ],
      "sources": [
        "src.call.42P22.3baebb248e633d9c8e75f53f"
      ],
      "limits": "Placeholders remain dynamic source fields; no concrete runtime value is claimed."
    },
    {
      "id": "message.variant-10",
      "sqlstate": "42P22",
      "severity_source": "ERROR",
      "primary_template": "could not determine which collation to use for string comparison",
      "detail_templates": [],
      "hint_templates": [
        "Use the COLLATE clause to set the collation explicitly."
      ],
      "roles": [
        {
          "role": "errmsg",
          "template": "could not determine which collation to use for string comparison"
        },
        {
          "role": "errhint",
          "template": "Use the COLLATE clause to set the collation explicitly."
        }
      ],
      "sources": [
        "src.call.42P22.0c130e4570c3138a788409e1"
      ],
      "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.42P22.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": []
}
