pg_list_tables
List tables and views in a PostgreSQL schema, returning name, type, and estimated row count. Supports pagination for large schemas.
Instructions
List tables (and optionally views) in a schema. Returns name, type (table/view/materialized view/foreign), and estimated row count (from reltuples; null = no ANALYZE yet on PG 14+; 0 may mean empty or unanalyzed on PG <= 13). Paginate via limit/offset on very large schemas.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows to return (default 500, max 10000). | |
| offset | No | Rows to skip for pagination (default 0). | |
| schema | No | Schema name (defaults to 'public'). | public |
| includeViews | No | If true, include views and materialized views. |