pg_vectorize
pg_vectorize copied to clipboard
rename vectorize.table "table" parameter
SELECT vectorize.table(
job_name => 'product_search_hf',
"table" => 'products',
primary_key => 'product_id',
columns => ARRAY['product_name', 'description'],
transformer => 'sentence-transformers/all-MiniLM-L6-v2',
schedule => 'realtime'
);
Having "table" as parameter causes a lot of issues for users. If the double quotes are missing the call will fail because table is a reserved word. We should rename that perhaps to "table_name" or "relation", and change the datatype to regclass. Idea with changing to regclass is that we will get more meaningful data validation errors if the table name provided does not exist, and I think using regclass would also mean we could remove the "schema" parameter.