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
I know you're focused on cockroach syntax, but this formatting nit keeps your otherwise super useful utility from being useful for postgres too.
Have you considered a dialect option, or something else that would allow sqlfmt to work for non-cockroach dialects? I understand the maintenance burden on you that sort of option could entail, but this tool is the best sql formatter I've come across, so I thought I'd ask.
The text was updated successfully, but these errors were encountered:
This kind of thing I think is not too difficult based on our current code. We could have the 0-argument function wrappers like this set an extra flag that would prevent them from printing the parens.
Example
generates
Note the
()
after current_timestamp, this is invalid syntax for postgres. I'm guessing you're normalizing to the built in function names as documented on https://www.cockroachlabs.com/docs/stable/functions-and-operators.html#special-syntax-formsI know you're focused on cockroach syntax, but this formatting nit keeps your otherwise super useful utility from being useful for postgres too.
Have you considered a dialect option, or something else that would allow sqlfmt to work for non-cockroach dialects? I understand the maintenance burden on you that sort of option could entail, but this tool is the best sql formatter I've come across, so I thought I'd ask.
The text was updated successfully, but these errors were encountered: