{
  "schema": 1,
  "sqlstate": "2201B",
  "condition_name": "invalid_regular_expression",
  "sources": [
    {
      "id": "src.errcodes.18.6",
      "kind": "upstream_source",
      "source_role": "condition_definition",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/errcodes.txt",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L190",
      "lines": "190"
    },
    {
      "id": "src.regexp-compile.18.6",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/regexp.c",
      "sha256": "8c54fe9e937ce03111b39da7bca89b22d6cb2de6b9ce5f7caf90c76bc7218e0e",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/regexp.c#L204-224",
      "lines": "204-224"
    },
    {
      "id": "src.regexp-execute.18.6",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/regexp.c",
      "sha256": "8c54fe9e937ce03111b39da7bca89b22d6cb2de6b9ce5f7caf90c76bc7218e0e",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/regexp.c#L285-305",
      "lines": "285-305"
    },
    {
      "id": "src.regexp-match.18.6",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/regexp.c",
      "sha256": "8c54fe9e937ce03111b39da7bca89b22d6cb2de6b9ce5f7caf90c76bc7218e0e",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/regexp.c#L2050-2070",
      "lines": "2050-2070"
    },
    {
      "id": "src.hba-compile.18.6",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/libpq/hba.c",
      "sha256": "b31049f83ce504979493155e9f496ab26b5f642969acc1d5280c32a86e7d1db3",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/libpq/hba.c#L298-340",
      "lines": "298-340"
    },
    {
      "id": "src.hba-load.18.6",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/libpq/hba.c",
      "sha256": "b31049f83ce504979493155e9f496ab26b5f642969acc1d5280c32a86e7d1db3",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/libpq/hba.c#L2635-2683",
      "lines": "2635-2683"
    },
    {
      "id": "src.hba-ident-match.18.6",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/libpq/hba.c",
      "sha256": "b31049f83ce504979493155e9f496ab26b5f642969acc1d5280c32a86e7d1db3",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/libpq/hba.c#L2835-2864",
      "lines": "2835-2864"
    },
    {
      "id": "src.hba-ident-backref.18.6",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/libpq/hba.c",
      "sha256": "b31049f83ce504979493155e9f496ab26b5f642969acc1d5280c32a86e7d1db3",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/libpq/hba.c#L2880-2887",
      "lines": "2880-2887"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "2201B is invalid_regular_expression in SQLSTATE Class 22.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed errcodes row and macro."
    },
    {
      "id": "sql-regex-path",
      "statement": "SQL regex compilation reports invalid regular expression: %s; execution errors other than REG_NOMATCH report regular expression failed: %s.",
      "sources": [
        "src.regexp-compile.18.6",
        "src.regexp-execute.18.6",
        "src.regexp-match.18.6"
      ],
      "method": "Read the compile and execution branches.",
      "limits": "REG_NOMATCH is a normal no-match result."
    },
    {
      "id": "hba-config-path",
      "statement": "HBA regex compilation checks only the token leading slash and passes token->string + 1 to the regex compiler; it uses a caller-selected level and load_hba passes LOG, while ident-map regex match and missing-backreference cases use separate LOG messages.",
      "sources": [
        "src.hba-compile.18.6",
        "src.hba-load.18.6",
        "src.hba-ident-match.18.6",
        "src.hba-ident-backref.18.6"
      ],
      "method": "Read the HBA compiler, load_hba caller, and ident-map branches.",
      "limits": "Configuration diagnostics are distinct from SQL expression ERROR paths."
    },
    {
      "id": "history",
      "statement": "The locked catalogue records 2201B from 7.4 without proving an exact implementation introduction date.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Use catalogue presence and history boundaries."
    }
  ],
  "messages": [
    {
      "id": "message.sql-compile",
      "sqlstate": "2201B",
      "primary_template": "invalid regular expression: %s",
      "severity_source": "ERROR",
      "sources": [
        "src.regexp-compile.18.6"
      ]
    },
    {
      "id": "message.sql-execute",
      "sqlstate": "2201B",
      "primary_template": "regular expression failed: %s",
      "severity_source": "ERROR",
      "sources": [
        "src.regexp-execute.18.6",
        "src.regexp-match.18.6"
      ],
      "limits": "Execution errors other than REG_NOMATCH."
    },
    {
      "id": "message.hba-compile",
      "sqlstate": "2201B",
      "primary_template": "invalid regular expression \"%s\": %s",
      "severity_source": "caller-selected (normal load_hba path passes LOG)",
      "sources": [
        "src.hba-compile.18.6",
        "src.hba-load.18.6"
      ],
      "context_template": "line %d of configuration file \"%s\""
    },
    {
      "id": "message.hba-ident-match",
      "sqlstate": "2201B",
      "primary_template": "regular expression match for \"%s\" failed: %s",
      "severity_source": "LOG",
      "sources": [
        "src.hba-ident-match.18.6"
      ]
    },
    {
      "id": "message.hba-ident-backref",
      "sqlstate": "2201B",
      "primary_template": "regular expression \"%s\" has no subexpressions as requested by backreference in \"%s\"",
      "severity_source": "LOG",
      "sources": [
        "src.hba-ident-backref.18.6"
      ]
    }
  ],
  "usage_evidence": [
    {
      "scope": "definition",
      "status": "definition_only",
      "evidence_ids": [
        "identity"
      ]
    },
    {
      "scope": "fixed-source-path",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "sql-regex-path",
        "hba-config-path"
      ]
    },
    {
      "scope": "history",
      "status": "unknown",
      "evidence_ids": [
        "history"
      ]
    },
    {
      "scope": "natural-runtime",
      "status": "unknown",
      "evidence_ids": [
        "sql-regex-path",
        "hba-config-path"
      ]
    }
  ],
  "runtime": []
}
