PostgreSQL Best Practices & Patterns

•
113k
•

Optimizes PostgreSQL performance and security through expert schema design, advanced indexing strategies, and production-ready implementation patterns.

PostgreSQL Patterns is a specialized skill for Claude Code designed to streamline database development and management. Based on Supabase best practices, it provides developers with a quick-reference guide for creating efficient schemas, implementing robust Row Level Security (RLS), and choosing the right index types (B-tree, GIN, BRIN) for specific query patterns. Whether you are building a new application, troubleshooting slow queries using pg_stat_statements, or setting up secure multi-tenant access, this skill helps you avoid common anti-patterns and ensures your database is tuned for scalability and performance.

Características Principales

01Advanced indexing guide covering B-tree, GIN, BRIN, and covering indexes
02Implementation patterns for cursor pagination, UPSERTs, and job queues
03Standardized data type recommendations for financial, temporal, and ID data
04Optimized Row Level Security (RLS) policy templates for multi-tenant security
05112,913 GitHub stars
06Performance troubleshooting queries to detect table bloat and missing indexes

Casos de Uso

01Optimizing slow-running SQL queries and identifying missing indexes
02Designing high-performance database schemas for new applications
03Implementing secure access control policies for Supabase or standard Postgres