-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FORMATTING] DEFAULT VALUES
not properly supported in INSERT statement
#718
Comments
Thanks for reporting. This can probably be patched in sql-formatter. Though there are many scenarios like that where it fails. If you want a Prettier plugin to format PostgreSQL, I suggest you try prettier-plugin-sql-cst. It does not yet support full PostgreSQL syntax, but it should work for most of the common scenarios (this issue tracks the current progress of PostgreSQL support) and it does an overall better job at formatting than SQL Formatter will ever be capable of. |
Thanks for the quick reply. About the Prettier plugin, I just did a quick check, and it seems to work well in most cases, but there are some cases that it does not support which we use in our case, such as types ( |
Thanks for the feedback. Always good to learn which actual features, that people are using, are missing. I can then possibly prioritize these before others. |
Input data
Which SQL and options did you provide as input?
options:
Expected Output
The main issue is that
DEFAULT VALUES
should be treated as a unit, as it is distinct from the usualVALUES
or the query that typically followsINSERT INTO
.Actual Output
Usage
The text was updated successfully, but these errors were encountered: