Skip to content

cannot use CTEs in core query #5

Open
Slania opened this Issue Feb 28, 2016 · 1 comment

2 participants

@Slania
Slania commented Feb 28, 2016
with update_some_other_foo as(
  insert into rep_table values(10,1) returning x
)
update rep_table
set y = 10
from update_some_other_foo
where rep_table.x = update_some_other_foo.x;
ERROR:  relation "(null)" is not managed by pg_paxos
@marcocitus marcocitus pushed a commit that closed this issue Feb 28, 2016
@marcoslot marcoslot Support statements that have non-table RTE's
Closes #4
Closes #5
9234cf3
@marcocitus
Citus Data member

Thanks for reporting this issue, it is the same one as #4. It is now fixed in the master branch.

In the develop branch this particular query is broken because it deparses the transformed query plan to do parameter substitution, but the deparsing functions (copied from ruleutils.c in PostgreSQL) seems to add an invalid prefix so "returning x" becomes "returning rep_table_1.x", which errors out.

@marcocitus marcocitus reopened this Feb 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.