postgresql-best-practices

Installation
SKILL.md

PostgreSQL Best Practices

Core Principles

  • Leverage PostgreSQL's advanced features for robust data modeling
  • Optimize queries using EXPLAIN ANALYZE and proper indexing strategies
  • Use native PostgreSQL data types appropriately
  • Implement proper connection pooling and resource management
  • Follow PostgreSQL-specific security best practices

Schema Design

Data Types

  • Use appropriate native types: UUID, JSONB, ARRAY, INET, CIDR
  • Prefer TIMESTAMPTZ over TIMESTAMP for timezone-aware applications
  • Use TEXT instead of VARCHAR when no length limit is needed
  • Consider NUMERIC for precise decimal calculations (financial data)
  • Use SERIAL or BIGSERIAL for auto-incrementing IDs, or UUID for distributed systems
Installs
858
GitHub Stars
133
First Seen
Jan 25, 2026
postgresql-best-practices — mindrally/skills