
supabase-postgres-best-practices
369.0K installs SupabaseBest for: Ordinary Postgres projects that need a broad default
This portable Supabase guide applies to Postgres anywhere. Its rule set spans schema design, migrations, row-level security, indexes, EXPLAIN, locking, connection management, and advanced Postgres features. The material is organized by priority, which gives an agent a useful order when a task touches several parts of a database at once.
The examples make the guidance operational. Rules pair incorrect SQL with a corrected version, and many include EXPLAIN output so the agent can connect a query shape to its cost. The coverage includes missing, partial, expression, and covering indexes, connection pooling, lock behavior, and RLS policies. The RLS material includes policy patterns that avoid repeated per-row work, while the locking material gives an agent database-level context before it changes a live schema. Use this as the broad starting rulebook for a Postgres project, then follow the conditional platform link when the task depends on a vendor product or workflow.
- Portable guidance for Postgres on any host
- Schema and migration patterns
- RLS, indexes, and EXPLAIN coverage
- Locking guidance for safer database changes






