Skip to content

Follow sqlparser main as it parses signed CONNECTION LIMIT - #147

Merged
LucaCappelletti94 merged 2 commits into
mainfrom
upstream/signed-connection-limit
Oct 27, 2026
Merged

LucaCappelletti94 merged 2 commits into
mainfrom
upstream/signed-connection-limit

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

sqlparser now parses PostgreSQL's signed CONNECTION LIMIT (apache/datafusion-sqlparser-rs#2731), so CONNECTION LIMIT -1 and CONNECTION LIMIT +5 reach sql-traits as a sign applied to a number. RoleLike::connection_limit only read an unsigned literal and answered None for +5.

It now reads the sign. PostgreSQL stores -1 for a role with no limit, so -1 answers None like an absent limit, and unlimited has a single answer. 0 stays Some(0), a role that admits no connection. The trait documentation states this in place of saying Some(-1) typically means unlimited.

@LucaCappelletti94 LucaCappelletti94 added the enhancement New feature or request label Oct 27, 2026
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@LucaCappelletti94
LucaCappelletti94 merged commit 6e492a3 into main Oct 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant