Convert common T-SQL CAST patterns to PostgreSQL types.
Used in views, procedures, and expressions.
Note on quoted type names: when input T-SQL uses bracket-wrapped types
like CAST(x AS [INT]), the upstream convertIdentifiers pass turns
[INT] into "INT". PG then parses "INT" as a quoted identifier
(column reference), not a type, and rejects with type "INT" does not exist. We strip quotes from known T-SQL type names first so the
existing patterns below match.
Convert common T-SQL CAST patterns to PostgreSQL types. Used in views, procedures, and expressions.
Note on quoted type names: when input T-SQL uses bracket-wrapped types like
CAST(x AS [INT]), the upstreamconvertIdentifierspass turns[INT]into"INT". PG then parses"INT"as a quoted identifier (column reference), not a type, and rejects withtype "INT" does not exist. We strip quotes from known T-SQL type names first so the existing patterns below match.