forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd69cd3a
committed
Ignore IntoClause.viewQuery in query jumbling
IntoClause.viewQuery is a copy of the parsed-but-not-rewritten SELECTclause copied to IntoClause when transforming CreateTableAsStmt for amaterialized view. Including a second copy of the SELECT Query into thequery jumbling was leading to an incorrect numbering of the Const nodelocations, as these would be counted twice instead of once.This becomes visible once the query normalization is applied to CREATEMATERIALIZED VIEW in pg_stat_statements in the shape of a query stringusing only odd numbers for the normalized constants, (regression testsadded in pg_stat_statements as ofde2aca2 would show the difference).Including the original Query from CreateTableAsStmt is enough for thequery jumbling.Reviewed-by: Bertrand DrouvotDiscussion:https://postgr.es/m/Y+MRdEq9W9XVa2AB@paquier.xyz1 parentee56048 commitd69cd3a
1 file changed
+6
-3
lines changedLines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
131 |
| - | |
132 |
| - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
133 | 135 |
| |
134 | 136 |
| |
135 | 137 |
| |
| |||
141 | 143 |
| |
142 | 144 |
| |
143 | 145 |
| |
144 |
| - | |
| 146 | + | |
| 147 | + | |
145 | 148 |
| |
146 | 149 |
| |
147 | 150 |
| |
|
0 commit comments
Comments
(0)