ERROR: cannot plan sharded modification containing values which are not constants or constant expressions
CREATE TABLE mytest (
id uuid,
myarr integer[],
PRIMARY KEY (id )
);
SELECT master_create_distributed_table('mytest', 'id', 'hash');
SELECT master_create_worker_shards('mytest', 1, 1);
INSERT INTO mytest VALUES('a4f64b48-2525-4214-8719-f101c5262e27', '{}');
UPDATE mytest
SET myarr = 3 || myarr
WHERE id = 'a4f64b48-2525-4214-8719-f101c5262e27';
Hello there,
> Is there any plan to support this?
I'm literally working on this now, your UPDATE query will work hopefully in our 5.2 release :)
> To avoid race conditions, would the best alternative be to unnest the array into another table?
Yeah, if unnesting suits your use-case it's likely your easiest alternative. Best is up to you to decide.
--
You received this message because you are subscribed to the Google Groups "citus-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to citus-users...@googlegroups.com.
To post to this group, send email to citus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/citus-users/98b29549-e6bc-4fe8-809f-5f96d5693647%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.