Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

cannot use CTEs in core query #5

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

cannot use CTEs in core query #5

Slania opened this issue Feb 28, 2016 · 1 comment

Comments

@Slania
Copy link

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
Copy link
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants