design-postgres-tables
Use this skill for general PostgreSQL table design.\n\n**Trigger when user asks to:**\n- Design PostgreSQL tables, schemas, or data models when creating new tables and when modifying existing ones.\n- Choose data types, constraints, or indexes for PostgreSQL\n- Create user
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Use this skill for general PostgreSQL table design.\n\nTrigger when user asks to:\n- Design PostgreSQL tables, schemas, or data models when creating new tables and when modifying existing ones.\n- Choose data types, constraints, or indexes for PostgreSQL\n- Create user tables, order tables, reference tables, or JSONB schemas\n- Understand PostgreSQL best practices for normalization, constraints, or indexing\n- Design update-heavy, upsert-heavy, or OLTP-style tables\n\n\nKeywords: PostgreSQL schema, table design, data types, PRIMARY KEY, FOREIGN KEY, indexes, B-tree, GIN, JSONB, constraints, normalization, identity columns, partitioning, row-level security\n\nComprehensive reference covering data types, indexing strategies, constraints, JSONB patterns, partitioning, and PostgreSQL-specific best practices.
How to use
- Zainstaluj umiejętność w swoim środowisku Claude/Copilot, wskazując repozytorium timescale/pg-aiguide.
- Uruchom umiejętność, gdy planujesz nową tabelę lub schemat – opisz cel (np. tabela użytkowników, zamówień, dziennika zdarzeń) i wymagania dostępu.
- Podaj istniejące dane lub strukturę, którą chcesz zmodyfikować; umiejętność zaproponuje typy danych (BIGINT, TIMESTAMPTZ, NUMERIC, TEXT), klucze (PRIMARY KEY, FOREIGN KEY) i ograniczenia (NOT NULL, DEFAULT).
- Poproś o rekomendacje indeksów – umiejętność wskaże, które kolumny indeksować (klucze, filtry, sortowania) i jaki typ indeksu wybrać (B-tree, GIN dla JSONB).
- Jeśli pracujesz z danymi zagnieżdżonymi, poproś o wzorce JSONB i porady dotyczące normalizacji versus denormalizacji dla Twojego przypadku użycia.
- Przejrzyj sugestie pod kątem konwencji PostgreSQL (snake_case, unikanie cudzysłowów w nazwach) i zastosuj je w swoim DDL.