News for hackers. Stuff that matters.
Re:What I Wish Someone Told Me About Postgres by gnulinux on Tuesday November 12, 2024 @10:49AM (#42116479)
I'm curious about this for DuckDB [1]. In the last couple months or so I've been using DuckDB as a one-step solution to all problems I solve. In fact my development environment rarely requires anything other than Python and DuckDB (and some Rust if native code is necessary). DuckDB is an insanely fast and featureful analytic db. It'd be nice to have a linter, formatter etc specifically for DuckDB.

There is sqlfluff etc but I'm curious what people use.

[1] DuckDB SQL dialect is very close to Postgres, it's compatible in many ways but has some extra QOL features related to analytics, and lacks a few features like `vacuum full`;

Re:What I Wish Someone Told Me About Postgres by ptman on Tuesday November 12, 2024 @03:14PM (#42119226)
sqlfluff is better than https://github.com/darold/pgFormatter , but it can get confused at times.
Re:What I Wish Someone Told Me About Postgres by chrisjc on Friday November 15, 2024 @11:01AM (#42148078)
Since you're using python, have you looked into sqlglot? I think it has some pretty-print options.

https://github.com/tobymao/sqlglot