skills sourced live from GitHub · all skills listed are free · each skill is provided under its author's license.
home / Database / PostgreSQL Table Design Skill by @wshobson
The skill is the plugins/database-design/skills/postgresql-table-design folder inside that repository. Copy it into the folder your agent loads skills from; check your agent's documentation for where that is.
Use this skill when designing or reviewing a PostgreSQL-specific schema.
A PostgreSQL-specific schema design reference covering data types, indexing, constraints, performance patterns and gotchas, including types to avoid. It opens with core rules, then covers PostgreSQL-specific gotchas, data types, constraints and indexing advice.
The original SKILL.md is organised into these sections:
Written and maintained by @wshobson. It is published under the MIT license, which allows reuse with attribution. See the author profile. SkillDirectory does not claim authorship: this page adds our own review and links back to the original, and the skill's text belongs to its author.
# PostgreSQL Table Design ## When to Use - Designing a new PostgreSQL schema, or reviewing one before it ships. - Choosing column types, keys, constraints, or indexes for PostgreSQL specifically. - Deciding whether and how to partition a large table, or how to store semi-structured data. - Planning a schema change on a live database without downtime. The rules and decision points for a PostgreSQL schema. The full data-type catalog, workload patterns (update-heavy, insert-heavy, upsert, schema evolution), extensions, JSONB indexing, and worked DDL examples are in `references/details.md`; open it when a section below points there. ## Core Rules - Define a **PRIMARY KEY** for reference tables (users, orders, etc.). Not always needed for time-series/event/log data. When used, prefer `BIGINT GENERATED ALWAYS AS IDENTITY`; use `UUID` only when global uniqueness/opacity is needed. …
Excerpt only, quoted from the author's repository. Open the repository for the complete file.