File tree Expand file tree Collapse file tree 3 files changed +0
-49
lines changed Expand file tree Collapse file tree 3 files changed +0
-49
lines changed Original file line number Diff line number Diff line change @@ -530,9 +530,6 @@ rewriteRuleAction(Query *parsetree,
530530 *
531531 * This could possibly be fixed by using some sort of internally
532532 * generated ID, instead of names, to link CTE RTEs to their CTEs.
533- * However, decompiling the results would be quite confusing; note the
534- * merge of hasRecursive flags below, which could change the apparent
535- * semantics of such redundantly-named CTEs.
536533 */
537534 foreach (lc , parsetree -> cteList )
538535 {
@@ -554,9 +551,6 @@ rewriteRuleAction(Query *parsetree,
554551 /* OK, it's safe to combine the CTE lists */
555552 sub_action -> cteList = list_concat (sub_action -> cteList ,
556553 copyObject (parsetree -> cteList ));
557- /* ... and don't forget about the associated flags */
558- sub_action -> hasRecursive |= parsetree -> hasRecursive ;
559- sub_action -> hasModifyingCTE |= parsetree -> hasModifyingCTE ;
560554 }
561555
562556 /*
Original file line number Diff line number Diff line change @@ -1672,33 +1672,6 @@ SELECT * FROM bug6051_2;
16721672 3
16731673(3 rows)
16741674
1675- -- silly example to verify that hasModifyingCTE flag is propagated
1676- CREATE TEMP TABLE bug6051_3 AS
1677- select a from generate_series(11,13) as a;
1678- CREATE RULE bug6051_3_ins AS ON INSERT TO bug6051_3 DO INSTEAD
1679- SELECT i FROM bug6051_2;
1680- BEGIN; SET LOCAL force_parallel_mode = on;
1681- WITH t1 AS ( DELETE FROM bug6051_3 RETURNING * )
1682- INSERT INTO bug6051_3 SELECT * FROM t1;
1683- i
1684- ---
1685- 1
1686- 2
1687- 3
1688- 1
1689- 2
1690- 3
1691- 1
1692- 2
1693- 3
1694- (9 rows)
1695-
1696- COMMIT;
1697- SELECT * FROM bug6051_3;
1698- a
1699- ---
1700- (0 rows)
1701-
17021675-- a truly recursive CTE in the same list
17031676WITH RECURSIVE t(a) AS (
17041677 SELECT 0
Original file line number Diff line number Diff line change @@ -773,22 +773,6 @@ INSERT INTO bug6051 SELECT * FROM t1;
773773SELECT * FROM bug6051;
774774SELECT * FROM bug6051_2;
775775
776- -- silly example to verify that hasModifyingCTE flag is propagated
777- CREATE TEMP TABLE bug6051_3 AS
778- select a from generate_series(11 ,13 ) as a;
779-
780- CREATE RULE bug6051_3_ins AS ON INSERT TO bug6051_3 DO INSTEAD
781- SELECT i FROM bug6051_2;
782-
783- BEGIN ; SET LOCAL force_parallel_mode = on ;
784-
785- WITH t1 AS ( DELETE FROM bug6051_3 RETURNING * )
786- INSERT INTO bug6051_3 SELECT * FROM t1;
787-
788- COMMIT ;
789-
790- SELECT * FROM bug6051_3;
791-
792776-- a truly recursive CTE in the same list
793777WITH RECURSIVE t(a) AS (
794778 SELECT 0
You can’t perform that action at this time.
0 commit comments