Closed
Description
Example
const parsed = parse('select "A" from "table_name");
const deparsed = deparse(parsed);
// departed is now 'select A from table_name'
const parsed = parse('select "AA" from "table_name");
const deparsed = deparse(parsed);
// departed is now 'select AA from table_name'
I think the fix would be to change the const needsQuotesRegex = /[a-z]+[\W\w]*[A-Z]+|[A-Z]+[\W\w]*[a-z]+|\W/;
to
`const needsQuotesRegex = /[a-z]+[\W\w][A-Z]+|[A-Z]+[\W\w][a-z]+|\W|[A-Z]/;
At https://github.com/pyramation/pgsql-parser/blob/3d78dc66d800eb8cdf76851337f27b972160fb41/packages/deparser/src/deparser.js#L112C1-L112C71
Metadata
Metadata
Assignees
Labels
No labels