Skip to content

Comments

Add limit to missing "smart-quote" Keywords#177

Merged
tianzhou merged 1 commit intopgplex:mainfrom
Adam-Mustafa:add-limit-to-quote-list
Nov 28, 2025
Merged

Add limit to missing "smart-quote" Keywords#177
tianzhou merged 1 commit intopgplex:mainfrom
Adam-Mustafa:add-limit-to-quote-list

Conversation

@Adam-Mustafa
Copy link
Contributor

@Adam-Mustafa Adam-Mustafa commented Nov 27, 2025

Adds limit to the list of "smart-quote" keywords that render column/variable names with a quote.

Note: Will be adding more as a follow-up (#178)

Copilot AI review requested due to automatic review settings November 27, 2025 18:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds "limit" to the list of SQL reserved words that require smart quoting when used as identifiers. The change ensures that column or variable names matching the SQL "limit" keyword are properly quoted to avoid syntax errors.

  • Adds "limit" to the reservedWords map
  • Adds test cases to verify that "limit" is correctly identified as requiring quotes

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
ir/quote.go Adds "limit" to the reservedWords map to mark it as requiring quotes
ir/quote_test.go Adds test cases for the "limit" keyword in both NeedsQuoting and QuoteIdentifier tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Adam-Mustafa Adam-Mustafa force-pushed the add-limit-to-quote-list branch from 00aedb9 to 64a244a Compare November 27, 2025 19:31
Copy link
Contributor

@tianzhou tianzhou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tianzhou tianzhou merged commit c0052db into pgplex:main Nov 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants