| name | postgresql |
| description | PostgreSQL query optimization, indexing, full-text search, JSONB, and advanced features. |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
PostgreSQL Skill
Expert assistance for PostgreSQL database design and optimization.
Capabilities
- Design optimal schemas
- Create performant indexes
- Implement full-text search
- Work with JSONB data
- Optimize query performance
- Configure replication
Indexing Patterns
CREATE INDEX idx_users_email ON users(email);
CREATE INDEX idx_posts_tags ON posts USING GIN(tags);
CREATE INDEX idx_posts_search ON posts USING GIN(to_tsvector('english', title || ' ' || content));
CREATE INDEX idx_active_users ON users(created_at) WHERE active = true;
JSONB Operations
SELECT * FROM users WHERE metadata->>'role' = 'admin';
UPDATE users SET metadata = metadata || '{"verified": true}'::jsonb WHERE id = 1;
Target Processes
- database-design
- performance-optimization
- backend-development