Repository navigation
PostgreSQL: Parse a cast on a qualified wildcard - #2780
Open
LucaCappelletti94 wants to merge 5 commits into
Open
LucaCappelletti94 wants to merge 5 commits into
LucaCappelletti94 wants to merge 5 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2780 +/- ##
==========================================
+ Coverage 83.09% 83.11% +0.02%
==========================================
Files 42 42
Lines 36261 36262 +1
Branches 36261 36262 +1
==========================================
+ Hits 30130 30139 +9
+ Misses 2636 2631 -5
+ Partials 3495 3492 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LucaCappelletti94
force-pushed
the
upstream/qualified-wildcard-cast
branch
from
November 2, 2026 14:17
a084522 to
e198813
Compare
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.
SELECT t.*::t AS t FROM tfails underPostgreSqlDialectwithExpected: end of statement, found: ::, and so doUPDATE t SET a = 1 RETURNING t.*::tandSELECT f(t.*::t) FROM t. PostgreSQL accepts all three, andpg_get_functiondef,pg_get_viewdefandpg_dumpprint a whole-row reference at the top of a target list in exactly this form, because the cast stopst.*from being expanded into its columns (ruleutils.c,get_variable).Parser::parse_wildcard_exprreturned the qualified wildcard as soon as it readt.*, before looking at what follows. When::comes next it now parses the item as an expression, wheret.*is already an operand under PostgreSQL (WHERE t.* IS NOT NULLparses today), so the item becomes aCastofExpr::QualifiedWildcard. A plaint.*keeps its wildcard select item.Very small change, very long explaination.