postgresql
PostgreSQL gotchas and version-gated facts - indexing (B-tree, GIN, GiST, BRIN, partial, expression), JSONB, EXPLAIN ANALYZE and tuning, row-level security and multi-tenancy, full-text search, partiti
SKILL.mdtemplate/.claude/skills/postgresql/SKILL.md
GitHubPostgreSQL
Each reference lists what models get wrong about one area, with version gates and anti-hallucination rules. Read only the reference that matches the task; read several when the task spans them (a slow JSONB query needs both jsonb-patterns and query-performance).
| Task | Reference |
|---|---|
| Choosing or reviewing an index | references/postgresql-advanced-indexing.md |
Slow query, reading EXPLAIN ANALYZE, server settings |
references/postgresql-query-performance.md |
| JSONB columns, operators, indexing, updates | references/postgresql-jsonb-patterns.md |
| Row-level security, tenant isolation | references/postgresql-row-level-security.md |
Full-text search (tsvector, tsquery, ranking) |
references/postgresql-full-text-search.md |
| Partitioning large tables | references/postgresql-table-partitioning.md |
| Connection pooling, exhaustion, timeouts | references/postgresql-connection-management.md |
| Installing or upgrading extensions | references/postgresql-extensions.md |
| Logical replication | references/postgresql-replication.md |
| Vector similarity search with pgvector | references/postgresql-vector-search.md |
| RAG, hybrid search | references/postgresql-genai-rag.md |
- Check the server version (
SELECT version();) before recommending a version-gated feature. - Schema changes (indexes, extensions, RLS policies, partitions) go through EF Core migrations, raw SQL in
migrationBuilder.Sql(...)where EF has no API, following theef-migrationsrule. Don't apply DDL directly to a database.