Expand description
Schema introspection queries against pg_catalog.
information_schema is portable but slow on large databases (the views
join across many tables and filter by privilege). pg_catalog is direct,
orders of magnitude faster, and exposes the metadata Postgres tooling
actually needs (relkind, oids, persistence). All queries are
parameter-less SELECTs to keep the surface boring and review-able.
Structs§
- Column
Detail - Per-column metadata used by the INSERT form to pre-set Use
DEFAULT and NULL toggles. Read from
pg_attributejoined withpg_attrdeffor the default-presence flag. - DbSummary
- Object
Type - Relation
- Routine
- Schema
Contents - Unified schema-contents view used by the tree’s “expand a schema” path. Six-way grouping mirrors DataGrip’s tree. Tables include regular, partitioned, and foreign tables (all “data-bearing relations”); views and materialized views split out for clarity.
- Schema
Summary - Sequence
Enums§
- Object
Type Kind - Relation
Kind - Discriminator for tables / views / matviews / partitioned tables /
foreign tables. Matches
pg_class.relkindvalues that an explorer cares about. Sequences, indexes, composite types, and TOAST relations are excluded fromlist_relationsand so do not appear here. - Routine
Kind
Functions§
- describe_
columns - list_
databases - list_
object_ types - list_
relations - list_
routines - list_
schema_ contents - Concurrent fetch of all schema contents in one logical call.
tokio_postgres::Clientpipelines so the four queries overlap on the wire — total latency is roughly max(query_latency) rather than 4× a single query. - list_
schemas - list_
sequences