- Notifications
You must be signed in to change notification settings - Fork5
Commit7b90469
committed
Allow adding values to an enum type created in the current transaction.
Normally it is unsafe to allow ALTER TYPE ADD VALUE in a transaction block,because instances of the value could be added to indexes later in the sametransaction, and then they would still be accessible even if thetransaction rolls back. However, we can allow this if the enum type itselfwas created in the current transaction, because then any such indexes wouldhave to go away entirely on rollback.The reason for allowing this is to support pg_upgrade's new usage ofpg_restore --single-transaction: in --binary-upgrade mode, pg_dump emitsenum types as a succession of ALTER TYPE ADD VALUE commands so that it canpreserve the values' OIDs. The support is a bit limited, so we'll leaveit undocumented.Andres Freund1 parent452739d commit7b90469
File tree
5 files changed
+74
-11
lines changed- src
- backend
- commands
- tcop
- include/commands
- test/regress
- expected
- sql
5 files changed
+74
-11
lines changedLines changed: 21 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1169 | 1169 |
| |
1170 | 1170 |
| |
1171 | 1171 |
| |
1172 |
| - | |
| 1172 | + | |
1173 | 1173 |
| |
1174 | 1174 |
| |
1175 | 1175 |
| |
| |||
1183 | 1183 |
| |
1184 | 1184 |
| |
1185 | 1185 |
| |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
1186 | 1205 |
| |
1187 | 1206 |
| |
1188 | 1207 |
| |
1189 | 1208 |
| |
1190 | 1209 |
| |
1191 |
| - | |
| 1210 | + | |
1192 | 1211 |
| |
1193 | 1212 |
| |
1194 | 1213 |
| |
|
Lines changed: 1 addition & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
972 | 972 |
| |
973 | 973 |
| |
974 | 974 |
| |
975 |
| - | |
976 |
| - | |
977 |
| - | |
978 |
| - | |
979 |
| - | |
980 |
| - | |
981 |
| - | |
982 |
| - | |
| 975 | + | |
983 | 976 |
| |
984 | 977 |
| |
985 | 978 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 |
| - | |
| 29 | + | |
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
|
Lines changed: 24 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
556 | 556 |
| |
557 | 557 |
| |
558 | 558 |
| |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
559 | 583 |
| |
560 | 584 |
| |
561 | 585 |
| |
|
Lines changed: 27 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
257 | 257 |
| |
258 | 258 |
| |
259 | 259 |
| |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
260 | 287 |
| |
261 | 288 |
| |
262 | 289 |
| |
|
0 commit comments
Comments
(0)