upsert_rows
Insert or update rows in a PostgreSQL table using a defined conflict key, with typed row data and optional validation of affected row count.
Instructions
Upsert typed rows through a verified primary or unique conflict key
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Rows sharing one column set | |
| returning | No | Columns returned after commit validation | |
| schema_name | Yes | Exact schema name | |
| expected_rows | No | Optional exact affected row count | |
| relation_name | Yes | Exact table name | |
| update_columns | No | Inserted columns updated on conflict | |
| conflict_columns | Yes | Complete primary or non-partial unique key | |
| max_affected_rows | No | Hard mutation ceiling |