What problem does it solve? Designing PostgreSQL schemas involves many subtle decisions—choosing data types, indexing strategies, constraints, and partitioning—where mistakes lead to slow queries, data anomalies, and painful migrations. This Skill provides a comprehensive reference of PostgreSQL best practices so you can design correct, performant tables the first time. ## Core Features & Use Cases - Data Type Selection: Guidance on choosing BIGINT identity columns, TIMESTAMPTZ, NUMERIC, TEXT, JSONB, arrays, ranges, and which types to avoid (serial, varchar(n), money, timestamp without time zone). - Indexing & Constraints: Covers B-tree, GIN, GiST, BRIN, partial, covering, and expression indexes, plus PK/FK/UNIQUE/CHECK/EXCLUDE constraint patterns including the manual FK indexing requirement. - Workload-Specific Design: Patterns for update-heavy, insert-heavy, and upsert-heavy tables, plus partitioning strategies, JSONB guidance, row-level security, and safe schema evolution. - Use Case: When building a new orders table, use this Skill to get a schema with an identity primary key, proper foreign key indexes, CHECK constraints on status values, NUMERIC for money, and TIMESTAMPTZ defaults. ## Quick Start Ask the AI to design a PostgreSQL schema for your use case, such as a users and orders table with proper indexes and constraints.