Commit e03740b
Fix writable CTE cause wrong matview data status.
CTE is not well supported in GPDB, if a writable operation
inside CTE is actually executed, it may cause matview data
status fail to catch up with the underlying relation.
create table t_cte_issue_582(i int, j int);
create materialized view mv_t_cte_issue_582 as select j from
t_cte_issue_582 where i = 1;
with mod1 as (insert into t_cte_issue_582 values(1, 1) returning *)
select * from mod1;
The CTE sql will insert data into t_cte_issue_582, and the data
status of matviews have that relation should be updated.
Fix CTE part issue of #582
Authored-by: Zhang Mingli avamingli@gmail.com1 parent f038fbf commit e03740b
3 files changed
Lines changed: 70 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
1048 | | - | |
1049 | | - | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1050 | 1051 | | |
1051 | | - | |
1052 | | - | |
1053 | | - | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
1054 | 1056 | | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
1060 | | - | |
| 1057 | + | |
1061 | 1058 | | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
1067 | | - | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
1068 | 1065 | | |
1069 | | - | |
1070 | | - | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
1071 | 1077 | | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
1076 | | - | |
| 1078 | + | |
| 1079 | + | |
1077 | 1080 | | |
1078 | | - | |
1079 | | - | |
1080 | | - | |
| 1081 | + | |
1081 | 1082 | | |
1082 | 1083 | | |
1083 | 1084 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
404 | 434 | | |
405 | 435 | | |
406 | 436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
149 | 161 | | |
150 | 162 | | |
151 | 163 | | |
0 commit comments