needless-quotes
What it does
Section titled “What it does”Reports a quoted name that is a plain word, not reserved, and already in the case the dialect folds unquoted names to (upper case for ansi, lower case for postgres), so the quotes change nothing.
Why it matters
Section titled “Why it matters”The quotes suggest that the name is special, but it is the same name without them. Quotes also make the name case sensitive in the code that follows, which hides a mistake when one use is quoted and another is not.
To fix, remove the quotes.
Example
Section titled “Example”select "A", "a", "ab c", "SELECT", date, name, a as filter from t;Configuration
Section titled “Configuration”sql: lint: rules: needless-quotes: warn # off (default), warn, errorEnabled by the presets: sql/sqlfluff.
Suppress one line with sudsy-disable-next-line needless-quotes in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| sqlfluff | RF06 |
full |