postgresql-best-practices
Installation
SKILL.md
PostgreSQL Agent Skills — Routing Table
Use references as supplemental context — combine them with your PostgreSQL knowledge. If reference guidance is incomplete, answer with appropriate caveats rather than inventing details.
Key Constraints
- Never use
ALTER SYSTEMon managed services — use portal/CLI/ARM instead - Never assume
SUPERUSER— useazure_pg_admin(Azure) or equivalent managed role - Use
CONCURRENTLYforCREATE INDEX/REINDEX/DETACH PARTITIONin production pgsql_modifydoes NOT return row data (no RETURNING support)- Destructive DDL confirmation: Before executing
pgsql_modifywithDROP,TRUNCATE,DELETE(without WHERE), orALTER TABLE ... DROP, always ask the user for explicit confirmation. List the affected objects and warn about data loss before proceeding. - Version-gated features:
MERGE(PG 15+),json_table(PG 17+),DETACH CONCURRENTLY(PG 14+)
Managed Service Guardrails (Azure Flexible Server)
When the context is Azure Database for PostgreSQL, NEVER suggest: