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

   `SELECT * FROM ONLY t` parsed as a table named `ONLY` aliased `t`. It 
displayed back unchanged, so round-trip tests could not see it, while the 
relation visitor reported `ONLY` instead of `t`. `ONLY (t)` became a call to a 
function `ONLY`, and `ONLY t AS x`, `t*` and `app.t* AS x` failed to parse. 
`UPDATE` and `DELETE` behaved the same. PostgreSQL 16 accepts all of them 
(https://www.postgresql.org/docs/current/sql-select.html#SQL-FROM).
   
   `TableFactor::Table` now carries an `inheritance` field, parsed when the new 
`Dialect::supports_table_inheritance_markers` holds, which PostgreSQL and 
Generic enable. It holds an enum since PostgreSQL accepts at most one of the 
two markers on a table, and `Only` records whether the name was parenthesized 
so that `ONLY (t)` displays as written. A table named `only` stays reachable as 
`"only"`.
   
   Dialects: PostgreSQL, Generic
   
   Written with AI assistance.


-- 
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