Postgres Impl Schema Archaeology

Use when exploring an unfamiliar database, finding what references a table, locating unused or redundant indexes, or auditing a mature schema. Prevents slow introspection from using information_schema where pg_catalog is faster, DROP cascade surprises from skipping pg_depend, and missing orphan rows or wraparound risk in a legacy database. Covers information_schema vs pg_catalog, FK-graph navigation via pg_constraint, table + index size queries, unused index detection (pg_stat_user_indexes), redundant index detection, orphan row queries, sequence vs IDENTITY audit, pg_depend dependency graph, psql introspection shortcuts. Keywords: pg_catalog, information_schema, pg_class, pg_attribute, pg_constraint, pg_depend, pg_stat_user_indexes, pg_relation_size, foreign key graph, unused index, redundant index, orphan rows, schema introspection, how to explore a database, what references this table, find unused indexes, inherited a legacy database

Impertio-Studio 91ac579 4 files · 34.3 KB Updated

File contents

impertio-studio/postgresql-claude-skill-package/tree/main/skills/source/postgres-impl/postgres-impl-schema-archaeology commit 91ac57932f

Frequently asked questions

npx skillmds@latest add impertio-studio/postgres-impl-schema-archaeology