LucaCappelletti94 opened a new pull request, #2668:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2668

   PostgreSQL does not accept a single-quoted string as a column or table 
alias. The `SELECT` reference defines both as identifiers 
(https://www.postgresql.org/docs/current/sql-select.html), and PostgreSQL 16 
rejects `SELECT 1 AS 'x'`, `SELECT 1 'x'`, `SELECT a FROM t AS 'y'` and `SELECT 
a FROM t 'y'` with a syntax error. The parser accepted a string alias in every 
dialect.
   
   A new dialect method, `supports_string_literal_alias`, defaults to `true` so 
the other dialects are unchanged, and `PostgreSqlDialect` sets it to `false`. 
Tests check the exact errors for column and table aliases in PostgreSQL and 
that every other dialect still accepts both.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to