read_rows
Retrieves rows from a PostgreSQL table or view with optional column selection, filters, sorting, and limit, returning at most 1,000 rows.
Instructions
Reads rows of one table or view, with an optional filter, order and limit. Returns at most 1,000 rows and 1,048,576 bytes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | The most rows to return. Defaults to the row cap of 1,000. | |
| table | Yes | The table or view to read, by exact name. | |
| where | No | Conditions joined by AND. Omit to read every row. | |
| schema | No | The schema, by exact name. Defaults to public. | |
| columns | No | Columns to return, in order. Omit for every column the login may select. | |
| database | Yes | The database to run on. | |
| order_by | No | The sort order, first entry first. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | The result rows, each an array in column order. | |
| columns | Yes | The result columns, in order. | |
| truncated | Yes | True when the row cap, the byte cap or limit cut off more rows. |