You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
The text was updated successfully, but these errors were encountered:
ateszki
changed the title
Bug - Column names with a single capital letter are not surrounded by quotes on deparse.
Bug - Column names with a only capital lettersa re not surrounded by quotes on deparse.
Oct 3, 2023
ateszki
changed the title
Bug - Column names with a only capital lettersa re not surrounded by quotes on deparse.
Bug - Column names with a only capital letters are not surrounded by quotes on deparse.
Oct 23, 2023
Example
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
The text was updated successfully, but these errors were encountered: