5 ms·
The formatter adheres to CockroachDB rules which is why it acts like you describe. Case is insensitive in names unless you double quote it. Postgres-style (Cock
by mjibson 8y ago
The formatter adheres to CockroachDB rules which is why it acts like you describe. Case is insensitive in names unless you double quote it. Postgres-style (CockroachDB is one) uses "$1" for placeholders instead of "?". Adding "?" would complicate our grammar enough that it's not worth adding it.
sqlfmt is not super useful for non-postgres grammars.
- crooked-v 8y agoConsider those of us stuck with Java adapters to Postgres, which means Postgres syntax but ? for placeholders.
- mjibson 8y agoIs that a thing? The Java driver must actually parse those and convert them. Java is crazy. https://github.com/mjibson/sqlfmt/issues/25 https://github.com/mjibson/sqlfmt/issues/25 is the issue to track '?' as placeholders.
- lilactown 8y agoIt might be crazy, but having just gotten my hands dirty with some seriously DB programming, JDBC has a hell of a lot of value in my view.
- egorfine 8y agoI understand it about placeholders. Fair enough. I can do quick s/\?/\$1/g, no prob. Still how about not lowercasing identifiers? This is actually a blocker, I'm sure you see it:)