Support setting values in a table through a new UPSERT SET command like this:
UPSERT my_table SET title = 'CEO'
WHERE name = 'John Doe'
UPSERT my_table SET pay_by_quarter = ARRAY[25000,25000,27000,27000]
WHERE name = 'Carol';
UPSERT my_table SET pay_by_quarter[4] = 15000
WHERE name = 'Carol';
This would essentially be syntactic sugar and use the same UpsertCompiler, mapping to an UPSERT SELECT command that simply fills in the primary key columns like this:
UPSERT FROM my_table(name,title)
SELECT name,'CEO' FROM my_table
WHERE name = 'John Doe'
UPSERT FROM my_table(name, pay_by_quarter[4])
SELECT name,15000 FROM my_table
WHERE name = 'Carol';
Support setting values in a table through a new UPSERT SET command like this:
This would essentially be syntactic sugar and use the same UpsertCompiler, mapping to an UPSERT SELECT command that simply fills in the primary key columns like this: