forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc684898
committed
Fix domain_in() bug exhibited by Darcy Buskermolen. The idea of an EState
that's shorter-lived than the expression state being evaluated in it reallydoesn't work :-( --- we end up with fn_extra caches getting deleted whilestill in use. Rather than abandon the notion of caching expression stateacross domain_in calls altogether, I chose to make domain_in a bit cozierwith ExprContext. All we really need for evaluating variable-freeexpressions is an ExprContext, not an EState, so I invented the notion of a"standalone" ExprContext. domain_in can prevent resource leakages by doinga ReScanExprContext on this rather than having to free it entirely; so wecan make the ExprContext have the same lifespan (and particularly the sameper_query memory context) as the expression state structs.1 parentbf7b205 commitc684898
File tree
4 files changed
+105
-32
lines changed- src
- backend
- executor
- utils/adt
- include
- executor
- nodes
4 files changed
+105
-32
lines changedLines changed: 68 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
| |||
331 | 332 |
| |
332 | 333 |
| |
333 | 334 |
| |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
334 | 397 |
| |
335 | 398 |
| |
336 | 399 |
| |
| |||
352 | 415 |
| |
353 | 416 |
| |
354 | 417 |
| |
355 |
| - | |
| 418 | + | |
356 | 419 |
| |
357 |
| - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
358 | 423 |
| |
359 | 424 |
| |
360 | 425 |
| |
|
Lines changed: 33 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
20 |
| - | |
21 |
| - | |
22 |
| - | |
23 |
| - | |
24 |
| - | |
| 19 | + | |
| 20 | + | |
25 | 21 |
| |
26 | 22 |
| |
27 | 23 |
| |
28 | 24 |
| |
29 | 25 |
| |
30 | 26 |
| |
31 | 27 |
| |
32 |
| - | |
| 28 | + | |
33 | 29 |
| |
34 | 30 |
| |
35 | 31 |
| |
| |||
54 | 50 |
| |
55 | 51 |
| |
56 | 52 |
| |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
| |||
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
98 | 102 |
| |
99 | 103 |
| |
100 | 104 |
| |
| |||
107 | 111 |
| |
108 | 112 |
| |
109 | 113 |
| |
110 |
| - | |
| 114 | + | |
111 | 115 |
| |
112 | 116 |
| |
113 | 117 |
| |
| |||
125 | 129 |
| |
126 | 130 |
| |
127 | 131 |
| |
128 |
| - | |
129 | 132 |
| |
130 | 133 |
| |
131 |
| - | |
132 |
| - | |
133 | 134 |
| |
134 |
| - | |
135 |
| - | |
136 |
| - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
137 | 145 |
| |
138 | 146 |
| |
139 | 147 |
| |
140 |
| - | |
141 |
| - | |
142 |
| - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
143 | 151 |
| |
144 |
| - | |
145 |
| - | |
146 |
| - | |
147 | 152 |
| |
148 | 153 |
| |
149 | 154 |
| |
| |||
158 | 163 |
| |
159 | 164 |
| |
160 | 165 |
| |
161 |
| - | |
162 |
| - | |
163 |
| - | |
164 | 166 |
| |
165 | 167 |
| |
166 | 168 |
| |
| |||
170 | 172 |
| |
171 | 173 |
| |
172 | 174 |
| |
173 |
| - | |
174 |
| - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
175 | 182 |
| |
176 | 183 |
| |
177 | 184 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
224 | 224 |
| |
225 | 225 |
| |
226 | 226 |
| |
| 227 | + | |
227 | 228 |
| |
228 | 229 |
| |
229 | 230 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
121 |
| - | |
| 121 | + | |
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
|
0 commit comments
Comments
(0)