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 @@ -525,9 +525,6 @@ rewriteRuleAction(Query *parsetree,
525
525
*
526
526
* This could possibly be fixed by using some sort of internally
527
527
* generated ID, instead of names, to link CTE RTEs to their CTEs.
528
- * However, decompiling the results would be quite confusing; note the
529
- * merge of hasRecursive flags below, which could change the apparent
530
- * semantics of such redundantly-named CTEs.
531
528
*/
532
529
foreach (lc , parsetree -> cteList )
533
530
{
@@ -549,9 +546,6 @@ rewriteRuleAction(Query *parsetree,
549
546
/* OK, it's safe to combine the CTE lists */
550
547
sub_action -> cteList = list_concat (sub_action -> cteList ,
551
548
copyObject (parsetree -> cteList ));
552
- /* ... and don't forget about the associated flags */
553
- sub_action -> hasRecursive |= parsetree -> hasRecursive ;
554
- sub_action -> hasModifyingCTE |= parsetree -> hasModifyingCTE ;
555
549
}
556
550
557
551
/*
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