Why this matters
Same rationale as `snake-case-table-name`: quoted `"CamelCol"` forces every caller to quote-match the name, while unquoted `CamelCol` is silently lowercased to `camelcol`.
Examples
Incorrect
CREATE TABLE t ("CamelCol" INT);Correct
CREATE TABLE t (camel_col INT);CREATE TABLE t (CamelCol INT); -- folded to camelcolConfigure it
// eslint.config.js
import postgresql from "eslint-plugin-postgresql";
export default [
{
files: ["**/*.sql"],
languageOptions: {
parser: postgresql.configs.recommended.languageOptions.parser,
},
plugins: { postgresql },
rules: {
"postgresql/snake-case-column-name": [
"warn",
{
allow: [],
},
],
},
},
]; Options
Edit the SQL — only snake-case-column-name is enabled.
Pre-filled with the first incorrect example. Toggle off in the rule shelf to see how the diagnostic disappears.
Diagnostics
No issues found.
2 rules enabled.
Rule under test
snake-case-column-name — plus no-syntax-error as a safety net.