Repository navigation
feat: allow SELECT without target expressions for PostgreSQL - #2841
Open
princejain756 wants to merge 3 commits into
Open
princejain756 wants to merge 3 commits into
princejain756 wants to merge 3 commits into
Conversation
princejain756
force-pushed
the
pg-empty-select
branch
from
October 21, 2026 21:16
e24b070 to
1ecee1f
Compare
Making the select-items group optional for the target-less PostgreSQL SELECT let JavaCC see K_AS in the follow set of the optional AS STRUCT/VALUE qualifier block, producing a choice conflict at the block. Guard it with an explicit lookahead so AS only opens the qualifier when STRUCT or VALUE comes next.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2784.
PostgreSQL permits a SELECT with no target expressions, e.g.
which fails with a parse error because
SelectItemsListrequires at least oneSelectItem.With this change
PlainSelectaccepts an absent select-item list when the POSTGRESQL dialect is active andFROMfollowsSELECTdirectly. The parsed model exposes an empty select-items list rather than anUNSPECIFICnode, and both thetoStringpath andSelectDeParseravoid emitting a doubled space inSELECT FROMwhen the list is empty. Other dialects and all existing SELECT forms are unchanged.10,733 tests, 0 failures, 25 skipped.