forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commiteea9fa9
committed
Add defenses against unexpected changes in the NodeTag enum list.
Having different build systems producing different contents of theNodeTag enum would be catastrophic for extension ABI stability.But that ordering depends on the order in which gen_node_support.plprocesses its input files. It seems too fragile to let the Makefiles,MSVC build scripts, and soon meson build scripts all set this orderindependently. As a klugy but serviceable solution, put a canonicalcopy of the file list into gen_node_support.pl itself, and check thatagainst the files given on the command line.Also, while it's fine to add and delete node tags during development,we must not let the assigned NodeTag values change unexpectedly instable branches. Add a cross-check that can be enabled when a branchis forked off (or later, but that is a time when we're unlikely tomiss doing it). It just checks that the last auto-assigned numberdoesn't change, which is simplistic but will catch the most likelysorts of mistakes.From time to time we do need to add a node tag in a stable branch.To support doing that without changing the branch's auto-assignedtag numbers, invent pg_node_attr(nodetag_number(VALUE)) which canbe used to give such a node a hand-assigned tag above the lastauto-assigned one.Discussion:https://postgr.es/m/1249010.1657574337@sss.pgh.pa.us1 parentca187d7 commiteea9fa9
File tree
3 files changed
+113
-22
lines changed- src
- backend/nodes
- include/nodes
- tools
3 files changed
+113
-22
lines changedLines changed: 104 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 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 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
37 | 103 |
| |
38 | 104 |
| |
39 | 105 |
| |
| |||
90 | 156 |
| |
91 | 157 |
| |
92 | 158 |
| |
| 159 | + | |
| 160 | + | |
| 161 | + | |
93 | 162 |
| |
94 | 163 |
| |
95 | 164 |
| |
96 | 165 |
| |
97 | 166 |
| |
98 | 167 |
| |
99 | 168 |
| |
100 |
| - | |
101 |
| - | |
102 |
| - | |
103 |
| - | |
104 |
| - | |
105 |
| - | |
106 |
| - | |
107 |
| - | |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 |
| - | |
112 |
| - | |
113 |
| - | |
114 |
| - | |
115 |
| - | |
116 |
| - | |
117 |
| - | |
118 |
| - | |
119 | 169 |
| |
120 | 170 |
| |
121 | 171 |
| |
| |||
134 | 184 |
| |
135 | 185 |
| |
136 | 186 |
| |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
137 | 191 |
| |
138 | 192 |
| |
| 193 | + | |
139 | 194 |
| |
140 | 195 |
| |
141 | 196 |
| |
| |||
150 | 205 |
| |
151 | 206 |
| |
152 | 207 |
| |
| 208 | + | |
153 | 209 |
| |
154 | 210 |
| |
155 | 211 |
| |
156 | 212 |
| |
157 | 213 |
| |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
158 | 219 |
| |
159 | 220 |
| |
160 | 221 |
| |
| |||
274 | 335 |
| |
275 | 336 |
| |
276 | 337 |
| |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
277 | 342 |
| |
278 | 343 |
| |
279 | 344 |
| |
| |||
475 | 540 |
| |
476 | 541 |
| |
477 | 542 |
| |
478 |
| - | |
| 543 | + | |
| 544 | + | |
479 | 545 |
| |
480 | 546 |
| |
481 | 547 |
| |
482 |
| - | |
483 |
| - | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
484 | 559 |
| |
485 | 560 |
| |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
486 | 568 |
| |
487 | 569 |
| |
488 | 570 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
69 | 74 |
| |
70 | 75 |
| |
71 | 76 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
110 | 114 |
| |
111 | 115 |
| |
112 | 116 |
| |
|
0 commit comments
Comments
(0)