You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Redshift dialect: regtype 'int4' parses as a column with an alias, not a typed literal #2962
Redshift, like Postgres, accepts the generic typed-literal form type 'string' for any type name. sqlparser parses it as a typed string only for types it knows, such as regclass. For other type names it reads the type as a column and the string as an alias.
select regtype 'int4'
sqlparser 0.64.0: ExprWithAlias { expr: Identifier("regtype"), alias: Ident { value: "int4", quote_style: Some('\'') } }, i.e. the column regtype aliased as 'int4'.
Redshift: one row, integer, i.e. the literal 'int4' cast to regtype.
Other forms behave the same way: select "regtype" 'int4' returns integer and select regproc 'version' returns version on Redshift, while sqlparser parses both as aliased columns. select regclass 'pg_user' already parses as a typed string because sqlparser has a Regclass data type.
Activity