List tables in a schema
pg_list_tablesList PostgreSQL tables in a schema, optionally including views, with type and estimated row count to quickly assess table sizes and structure.
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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes |