Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Claude CodeNot declared
CursorNot declared
CodexNot declared
GitHub CopilotNot declared
WindsurfNot declared
Gemini CLINot declared
ClineNot declared
OpenCodeNot declared
Repository health
Stars15
LicenseLICENSE
Default branchmain
Open issues1
Status
Active
Package contents
Files included with this skill beyond the listing page.
skill mdSKILL.md3,537 B
docsSUMMARY.md609 B
History
First seen on skills.sh
First recorded snapshot · 20 installs
SKILL.md
PostgreSQL 16+ Reference
Version: 16+. All syntax is standard; most features apply to PostgreSQL 13+.
<quick_reference>
Quick patterns
-- Check running queries
SELECT pid, state, wait_event_type, query FROM pg_stat_activity WHERE state != 'idle';
-- Explain a slow query
EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) SELECT ...;
-- List table sizes
SELECT relname, pg_size_pretty(pg_total_relation_size(oid)) FROM pg_class
WHERE relkind = 'r' ORDER BY pg_total_relation_size(oid) DESC;
-- Kill a blocking query
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid = <pid>;
</quick_reference>
<rules>
Key non-obvious facts
Every statement runs in a transaction. Without BEGIN, each statement auto-commits.
jsonb stores parsed binary (faster queries); json stores raw text (exact input preserved). Prefer jsonb.
LIKE 'foo%' can use B-tree; LIKE '%foo' cannot — use pg_trgm GIN for suffix search.
CREATE INDEX CONCURRENTLY avoids table lock but cannot run inside a transaction block.
EXPLAIN without ANALYZE shows the planner's estimate. Always use EXPLAIN (ANALYZE, BUFFERS) for real data.
Null values are stored in indexes by B-tree (unlike some other databases). IS NULL can use an index.
SERIAL/BIGSERIAL are shorthand for sequence + default; prefer GENERATED ALWAYS AS IDENTITY (SQL standard).
Default isolation level is Read Committed. SERIALIZABLE prevents all anomalies but may abort transactions.
</rules>
<references>
Reference files
Load the relevant file when working on a specific topic: