You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE TABLE test_ref_multiexpr (
id bigint primary key
, col_int integer
, col_bool bool
, col_text text
, col_timestamp timestamp
);
select create_reference_table('test_ref_multiexpr');
create_reference_table
---------------------------------------------------------------------
(1 row)
insert into test_ref_multiexpr values (1, 1, true, 'one', now());
set client_min_messages to 'DEBUG4';
update test_ref_multiexpr
SET (col_timestamp)
= (SELECT now())
returning id, col_int, col_bool;
ERROR: unrecognized paramkind: 3
In citus_clauses.c, citus_evaluate_expr() is based on PostgreSQL executor to evaluate expressions, and (if I understood correctly), it'll execute function on local node before sending to other nodes, so we have the same value (now() being a good example).
The problem is similar to the other bug but at a distinct stage: citus is feeding an executor with an half processed rewriter tree which is not yet a planner tree good enough for being an executor tree. This pramkind:3 error is because in executor we do not handle MULTIEXPR, I think here it should already been computed and flatten.
Using the executor works well overall, I'm still unsure on the "good fix" for this case, as it looks like rewriting this part is essentially what has been avoided by using the executor in the first place...
It's tempting to just use upstream code like it's done in ruleutils, but with clauses.c or setrefs.c or similar upstream code...
Suggestions welcome!
The text was updated successfully, but these errors were encountered:
While working on #7675 I found another bug:
In
citus_clauses.c
,citus_evaluate_expr()
is based on PostgreSQL executor to evaluate expressions, and (if I understood correctly), it'll execute function on local node before sending to other nodes, so we have the same value (now()
being a good example).The problem is similar to the other bug but at a distinct stage: citus is feeding an executor with an half processed rewriter tree which is not yet a planner tree good enough for being an executor tree. This pramkind:3 error is because in executor we do not handle MULTIEXPR, I think here it should already been computed and flatten.
Using the executor works well overall, I'm still unsure on the "good fix" for this case, as it looks like rewriting this part is essentially what has been avoided by using the executor in the first place...
It's tempting to just use upstream code like it's done in ruleutils, but with clauses.c or setrefs.c or similar upstream code...
Suggestions welcome!
The text was updated successfully, but these errors were encountered: