SQLSage: a local PostgreSQL SELECT reviewer for Supabase query investigations #51771
Figo5
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm developing SQLSage, a free MIT CLI for reviewing PostgreSQL SELECT queries. I'm looking for feedback from Supabase builders who have a query they are already investigating.
It works with local schema DDL/catalog files and optional saved PostgreSQL plans. It explains the result, flags supported correctness/performance risks, and separates predictions from observed evidence. No Supabase service-role key, database connection, or query execution is needed for the file workflow.
Here is a small reproducible example for a public-schema table:
schema.sql
query.sql
With Node.js 22.18+:
I ran this exact example against published v0.2.2. It lists a non-unique ORDER BY at a LIMIT boundary as optional cleanup: tied rows can change which rows are returned. It does not present that as a verified wrong result. It also labels its execution description as an offline prediction and makes no speedup claim. You can start with
npx --yes sqlsage@0.2.2 demoinstead.This is not an RLS/security audit, server workload monitor, or automatic SQL rewriter. Schema/query support is limited; it does not establish that a Supabase policy is correct. Release update (October 15): v0.2.2 is published and independently checked through a fresh npm installation. It includes the saved-plan query-identity repair. Single-run timing comparisons are observations, not benchmarks.
If you already have query and schema files, try a five-minute local second opinion and tell us one thing the report helped with or got wrong. Feedback goes here; there is no beta application or advance questionnaire. Setup failures are useful feedback too.
Please keep SQL, schemas, plans, reports, credentials, and customer/employer data local. The public issue asks only for broad use cases and plain-language observations. No purchase is required; the MIT CLI remains free.
All reactions