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
TIMESTAMPTZoverTIMESTAMPfor timezone-aware applications - Use
TEXTinstead ofVARCHARwhen no length limit is needed - Consider
NUMERICfor precise decimal calculations (financial data) - Use
SERIALorBIGSERIALfor auto-incrementing IDs, orUUIDfor distributed systems