Re: Bug in query rewriter - hasModifyingCTE not getting set - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bug in query rewriter - hasModifyingCTE not getting set
Date
Msg-id 458405.1612724727@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug in query rewriter - hasModifyingCTE not getting set  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> That semantic issue doesn't get any less pressing just because the query
> was generated by rewrite.  So I now think that what we have to do is
> throw an error if we have a modifying CTE and sub_action is different
> from rule_action.  Not quite sure how to phrase the error though.

Another idea that'd avoid disallowing functionality is to try to attach
the CTEs to the rule_action not the sub_action.  This'd require adjusting
ctelevelsup in appropriate parts of the parsetree when those are
different, so it seems like it'd be a pain.  I remain unconvinced that
it's worth it.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Key management with tests
Next
From: "David G. Johnston"
Date:
Subject: Re: jsonb_array_elements_recursive()