vector_execute
Embed text and write the resulting vector into a PostgreSQL vector or halfvec column. Supports inserting a new row or updating existing rows from literal text or a text column.
Instructions
Insert or update a vector/halfvec column by embedding text. insert: embed text (optional fields, optional persist via text_column). update: write only the vector. Source is text (single row: id, or where that matches one row) or text_column (embed each matched row, where/id, optional limit). Use execute for delete and non-vector columns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | update: single row | |
| text | No | Literal to embed. Required for insert. For update, exactly one of text or text_column. | |
| limit | No | update + text_column: max rows (default 10, max 100) | |
| table | Yes | ||
| where | No | update: SQL WHERE fragment (no WHERE keyword) | |
| fields | No | insert only: other column values | |
| schema | No | Default: public | |
| id_column | No | Default: id | |
| operation | Yes | insert or update | |
| text_column | No | insert: also store `text` in this varchar. update: read this column per row and embed it. | |
| embedding_column | Yes | vector or halfvec column to write |