You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "LucaCappelletti94 (via GitHub)" <gi...@apache.org> on 2026/10/17 18:22:48 UTC
[PR] PostgreSQL: Reject string literals as aliases [datafusion-sqlparser-rs]
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] PostgreSQL: Reject string literals as aliases [datafusion-sqlparser-rs]
Posted by "LucaCappelletti94 (via GitHub)" <gi...@apache.org>.
LucaCappelletti94 commented on PR #2668:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2668#issuecomment-6248661780
Merging, thanks @s5dsn-eqee for the review!
cc @alamb @iffyio
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] PostgreSQL: Reject string literals as aliases [datafusion-sqlparser-rs]
Posted by "LucaCappelletti94 (via GitHub)" <gi...@apache.org>.
LucaCappelletti94 merged PR #2668:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2668
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] PostgreSQL: Reject string literals as aliases [datafusion-sqlparser-rs]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #2668:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2668#issuecomment-6238535735
## [Codecov](https://app.codecov.io/gh/apache/datafusion-sqlparser-rs/pull/2668?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 81.25%. Comparing base ([`1aabd12`](https://app.codecov.io/gh/apache/datafusion-sqlparser-rs/commit/1aabd12d12234de55b27f658add789eed1eaaa5c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`836cd19`](https://app.codecov.io/gh/apache/datafusion-sqlparser-rs/commit/836cd19e4f60e7762fc92440c2e551a3bffb3cdf?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #2668 +/- ##
=======================================
Coverage 81.25% 81.25%
=======================================
Files 42 42
Lines 33910 33917 +7
Branches 33910 33917 +7
=======================================
+ Hits 27553 27560 +7
Misses 2792 2792
Partials 3565 3565
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/datafusion-sqlparser-rs/pull/2668?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org