Skip to content

PostgreSQL: Support the VARIADIC function call argument marker - #2484

Open
LucaCappelletti94 wants to merge 1 commit into
apache:mainfrom
LucaCappelletti94:pg-variadic-function-arg
Open

LucaCappelletti94 wants to merge 1 commit into
apache:mainfrom
LucaCappelletti94:pg-variadic-function-arg

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

PostgreSqlDialect could not parse the VARIADIC argument marker in a function call, in any position:

Parser::parse_sql(&PostgreSqlDialect {}, "SELECT concat(VARIADIC a)");
// Err: sql parser error: Expected: ), found: a at Line: 1, Column: 24

The marker is added as FunctionArg::Variadic. Parsing is gated on Dialect::supports_variadic_function_argument, enabled for PostgreSQL and the generic dialect.

As in PostgreSQL, the marker is rejected on a wildcard operand, in combination with DISTINCT or ALL, and on any but the final argument.

@LucaCappelletti94
LucaCappelletti94 marked this pull request as ready for review September 3, 2026 20:13
@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-variadic-function-arg branch 4 times, most recently from e358745 to 66f00a5 Compare September 22, 2026 21:20
LucaCappelletti94 added a commit to LucaCappelletti94/sqlparser-rs that referenced this pull request Oct 1, 2026
@codecov-commenter

codecov-commenter commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.16%. Comparing base (bfc7d38) to head (efb39cc).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/parser/mod.rs 86.84% 2 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2484      +/-   ##
==========================================
+ Coverage   81.09%   81.16%   +0.06%     
==========================================
  Files          42       42              
  Lines       33682    33813     +131     
  Branches    33682    33813     +131     
==========================================
+ Hits        27316    27444     +128     
- Misses       2796     2802       +6     
+ Partials     3570     3567       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-variadic-function-arg branch from 94a4362 to efb39cc Compare October 2, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants