{
  "schema": 1,
  "sqlstate": "22025",
  "condition_name": "invalid_escape_sequence",
  "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#L182",
      "lines": "182"
    },
    {
      "id": "src.like.pattern",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/like_match.c",
      "sha256": "7cc02d42bc11e87e13cc61ea32f066627f9f5632dac37774160ae809b606b789",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/like_match.c#L159",
      "lines": "159-165"
    },
    {
      "id": "src.like.escape",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/adt/like_match.c",
      "sha256": "7cc02d42bc11e87e13cc61ea32f066627f9f5632dac37774160ae809b606b789",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/like_match.c#L439",
      "lines": "439-449"
    },
    {
      "id": "src.regexp.escape",
      "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#L793",
      "lines": "793-805"
    },
    {
      "id": "src.scan.unicode",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/parser/scan.l",
      "sha256": "bf453f1ae3c22b84fea6f8e8bed4fda476b7cfa49b234efbf92ca228234d0293",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/parser/scan.l#L697",
      "lines": "697-704"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "22025 is invalid_escape_sequence in SQLSTATE Class 22",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed errcodes row and macro."
    },
    {
      "id": "resolved-path",
      "statement": "Fixed PostgreSQL 18.6 LIKE, SQL regular-expression translation, and core scanner paths bind distinct escape-length, trailing-pattern, and malformed-Unicode guards.",
      "sources": [
        "src.like.pattern",
        "src.like.escape",
        "src.regexp.escape",
        "src.scan.unicode"
      ],
      "method": "Read complete source contexts for the representative guards.",
      "limits": "Source confirmation is not a natural runtime observation."
    },
    {
      "id": "history",
      "statement": "The locked catalogue records 22025 from 7.4 without proving an exact implementation introduction date.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Use catalogue presence and history boundaries."
    },
    {
      "id": "neighboring-codes",
      "statement": "SIMILAR separator overflow and regexp_replace parameter validation use different SQLSTATE paths (2200C/22023) and are not folded into 22025.",
      "sources": [
        "src.regexp.escape",
        "src.like.escape"
      ],
      "method": "Read the adjacent consumers and their explicit errcodes."
    }
  ],
  "messages": [
    {
      "id": "message.invalid-escape-like",
      "primary_template": "invalid escape string",
      "severity_source": "ERROR",
      "sources": [
        "src.like.escape"
      ],
      "sqlstate": "22025",
      "hint_template": "Escape string must be empty or one character."
    },
    {
      "id": "message.like-trailing",
      "primary_template": "LIKE pattern must not end with escape character",
      "severity_source": "ERROR",
      "sources": [
        "src.like.pattern"
      ],
      "sqlstate": "22025"
    },
    {
      "id": "message.invalid-escape-regexp",
      "primary_template": "invalid escape string",
      "severity_source": "ERROR",
      "sources": [
        "src.regexp.escape"
      ],
      "hint_template": "Escape string must be empty or one character.",
      "sqlstate": "22025"
    },
    {
      "id": "message.invalid-unicode",
      "primary_template": "invalid Unicode escape",
      "severity_source": "ERROR",
      "sources": [
        "src.scan.unicode"
      ],
      "hint_template": "Unicode escapes must be \\uXXXX or \\UXXXXXXXX.",
      "sqlstate": "22025"
    }
  ],
  "usage_evidence": [
    {
      "scope": "definition",
      "status": "definition_only",
      "evidence_ids": [
        "identity"
      ]
    },
    {
      "scope": "fixed-source-path",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "resolved-path"
      ]
    },
    {
      "scope": "history",
      "status": "unknown",
      "evidence_ids": [
        "history"
      ]
    },
    {
      "scope": "natural-runtime",
      "status": "unknown",
      "evidence_ids": [
        "resolved-path"
      ]
    }
  ],
  "runtime": []
}
