forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit006f42c
committed
Fix a couple of issues with pg_dump's handling of inheritance child tables
that have default expressions different from their parent. First, if theparent table's default expression has to be split out as a separateALTER TABLE command, we need a dependency constraint to ensure that thechild's command is given second. This is because the ALTER TABLE on theparent will propagate to the child. (We can't prevent that by using ONLY onthe parent's command, since it's possible that other children exist thatshould receive the inherited default.) Second, if the child has a NULLdefault where the parent does not, we have to explicitly say DEFAULT NULL onthe child in order for this state to be preserved after reload. (The latteractually doesn't work right because of a backend bug, but that is a separateissue.)Backpatch as far as 8.0. 7.x pg_dump has enough issues with altered tables(due to lack of dependency analysis) that trying to fix this one doesn't seemvery productive.1 parent73e6f9d commit006f42c
1 file changed
+43
-9
lines changedLines changed: 43 additions & 9 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 |
| |
| |||
326 | 326 |
| |
327 | 327 |
| |
328 | 328 |
| |
| 329 | + | |
| 330 | + | |
329 | 331 |
| |
330 | 332 |
| |
331 |
| - | |
332 |
| - | |
| 333 | + | |
333 | 334 |
| |
334 |
| - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
335 | 354 |
| |
336 |
| - | |
337 |
| - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
338 | 364 |
| |
339 |
| - | |
340 |
| - | |
341 |
| - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
342 | 376 |
| |
343 | 377 |
| |
344 | 378 |
| |
|
0 commit comments
Comments
(0)