insert_rows
Inserts rows into a PostgreSQL table. Rolls back calls changing more than 100 rows, triggers and cascades included, and returns affected count plus requested returning rows.
Instructions
Inserts rows into one table. Rolls back a call that changes more than 100 rows, triggers and cascades included. Returns rowsAffected and up to 1,000 returning rows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | The rows to insert. An omitted column takes its default. | |
| table | Yes | The table or view to insert into, by exact name. | |
| schema | No | The schema, by exact name. Defaults to public. | |
| database | Yes | The database to run on. | |
| returning | No | Columns to return from each changed row. Omit to return none. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | The result rows, each an array in column order. | |
| columns | Yes | The result columns, in order. | |
| rowsAffected | Yes | The number of rows changed. |