File tree 3 files changed +0
-49
lines changed 3 files changed +0
-49
lines changed Original file line number Diff line number Diff line change @@ -530,9 +530,6 @@ rewriteRuleAction(Query *parsetree,
530
530
*
531
531
* This could possibly be fixed by using some sort of internally
532
532
* 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.
536
533
*/
537
534
foreach (lc , parsetree -> cteList )
538
535
{
@@ -554,9 +551,6 @@ rewriteRuleAction(Query *parsetree,
554
551
/* OK, it's safe to combine the CTE lists */
555
552
sub_action -> cteList = list_concat (sub_action -> cteList ,
556
553
copyObject (parsetree -> cteList ));
557
- /* ... and don't forget about the associated flags */
558
- sub_action -> hasRecursive |= parsetree -> hasRecursive ;
559
- sub_action -> hasModifyingCTE |= parsetree -> hasModifyingCTE ;
560
554
}
561
555
562
556
/*
Original file line number Diff line number Diff line change @@ -1672,33 +1672,6 @@ SELECT * FROM bug6051_2;
1672
1672
3
1673
1673
(3 rows)
1674
1674
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
-
1702
1675
-- a truly recursive CTE in the same list
1703
1676
WITH RECURSIVE t(a) AS (
1704
1677
SELECT 0
Original file line number Diff line number Diff line change @@ -773,22 +773,6 @@ INSERT INTO bug6051 SELECT * FROM t1;
773
773
SELECT * FROM bug6051;
774
774
SELECT * FROM bug6051_2;
775
775
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
-
792
776
-- a truly recursive CTE in the same list
793
777
WITH RECURSIVE t(a) AS (
794
778
SELECT 0
You can’t perform that action at this time.
0 commit comments