postgresql
Installation
SKILL.md
When to use this skill
Use this skill whenever the user wants to:
- Design tables, indexes, constraints, triggers, or PL/pgSQL functions
- Write or optimize SQL queries (joins, CTEs, window functions, aggregations)
- Use PostgreSQL-specific features (JSONB, full-text search, array types, pgvector)
- Manage users, roles, and permissions with psql
- Configure backup (pg_dump), replication, or performance tuning (EXPLAIN ANALYZE)
How to use this skill
Workflow
- Identify the task - Schema design, query writing, optimization, or administration
- Write the SQL - Use the patterns and examples below
- Analyze performance - Run EXPLAIN ANALYZE on slow queries
- Apply best practices - Index strategy, VACUUM, partitioning as needed