forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit787db4b
committed
Make new GENERATED-expressions code more bulletproof.
In commit8bf6ec3 I assumed that no code path could reachExecGetExtraUpdatedCols without having gone throughExecInitStoredGenerated. That turns out not to be the case inlogical replication: if there's an ON UPDATE trigger on the targettable, trigger.c will call this code before anybody has set up itsgenerated columns. Having seen that, I don't have a lot of faith inthere not being other such paths. ExecGetExtraUpdatedCols can callExecInitStoredGenerated for itself, as long as we are willing toassume that it is only called in CMD_UPDATE operations, which onthe whole seems like a safer leap of faith.Per report from Vitaly Davydov.Discussion:https://postgr.es/m/d259d69652b8c2ff50e14cda3c236c7f@postgrespro.ru1 parentc159b03 commit787db4b
File tree
4 files changed
+51
-11
lines changed- src
- backend/executor
- include/executor
- test/subscription/t
4 files changed
+51
-11
lines changedLines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| 55 | + | |
55 | 56 |
| |
56 | 57 |
| |
57 | 58 |
| |
| |||
1285 | 1286 |
| |
1286 | 1287 |
| |
1287 | 1288 |
| |
1288 |
| - | |
1289 |
| - | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
1290 | 1292 |
| |
1291 | 1293 |
| |
1292 | 1294 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
257 | 257 |
| |
258 | 258 |
| |
259 | 259 |
| |
260 |
| - | |
| 260 | + | |
261 | 261 |
| |
262 | 262 |
| |
263 | 263 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 |
| |
19 | 23 |
| |
20 | 24 |
| |
|
Lines changed: 42 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
| 6 | + | |
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
| 25 | + | |
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + |
0 commit comments
Comments
(0)