forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite42375f
committed
Retain comments on indexes and constraints at ALTER TABLE ... TYPE ...
When a column's datatype is changed, ATExecAlterColumnType() rebuilds allthe affected indexes and constraints, and the comments from the oldindexes/constraints were not carried over.To fix, create a synthetic COMMENT ON command in the work queue, to re-addany comments on constraints. For indexes, there's a comment field inIndexStmt that is used.This fixes bug #13126, reported by Kirill Simonov. Original patch byMichael Paquier, reviewed by Petr Jelinek and me. This bug is present inall versions, but only backpatch to 9.5. Given how minor the issue is, itdoesn't seem worth the work and risk to backpatch further than that.1 parent1ab9faa commite42375f
File tree
4 files changed
+163
-2
lines changed- src
- backend/commands
- include/nodes
- test/regress
- expected
- sql
4 files changed
+163
-2
lines changedLines changed: 63 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
386 | 386 |
| |
387 | 387 |
| |
388 | 388 |
| |
| 389 | + | |
| 390 | + | |
389 | 391 |
| |
390 | 392 |
| |
391 | 393 |
| |
| |||
3514 | 3516 |
| |
3515 | 3517 |
| |
3516 | 3518 |
| |
| 3519 | + | |
| 3520 | + | |
| 3521 | + | |
3517 | 3522 |
| |
3518 | 3523 |
| |
3519 | 3524 |
| |
| |||
8654 | 8659 |
| |
8655 | 8660 |
| |
8656 | 8661 |
| |
| 8662 | + | |
| 8663 | + | |
8657 | 8664 |
| |
8658 | 8665 |
| |
8659 | 8666 |
| |
| |||
8672 | 8679 |
| |
8673 | 8680 |
| |
8674 | 8681 |
| |
| 8682 | + | |
| 8683 | + | |
| 8684 | + | |
8675 | 8685 |
| |
8676 | 8686 |
| |
| 8687 | + | |
| 8688 | + | |
| 8689 | + | |
8677 | 8690 |
| |
8678 |
| - | |
8679 |
| - | |
| 8691 | + | |
| 8692 | + | |
| 8693 | + | |
| 8694 | + | |
8680 | 8695 |
| |
8681 | 8696 |
| |
8682 | 8697 |
| |
8683 | 8698 |
| |
| 8699 | + | |
| 8700 | + | |
| 8701 | + | |
| 8702 | + | |
| 8703 | + | |
| 8704 | + | |
8684 | 8705 |
| |
8685 | 8706 |
| |
8686 | 8707 |
| |
| |||
8697 | 8718 |
| |
8698 | 8719 |
| |
8699 | 8720 |
| |
| 8721 | + | |
| 8722 | + | |
| 8723 | + | |
| 8724 | + | |
| 8725 | + | |
| 8726 | + | |
8700 | 8727 |
| |
8701 | 8728 |
| |
8702 | 8729 |
| |
| |||
8711 | 8738 |
| |
8712 | 8739 |
| |
8713 | 8740 |
| |
| 8741 | + | |
| 8742 | + | |
| 8743 | + | |
| 8744 | + | |
| 8745 | + | |
| 8746 | + | |
| 8747 | + | |
| 8748 | + | |
| 8749 | + | |
| 8750 | + | |
| 8751 | + | |
| 8752 | + | |
| 8753 | + | |
| 8754 | + | |
| 8755 | + | |
| 8756 | + | |
| 8757 | + | |
| 8758 | + | |
| 8759 | + | |
| 8760 | + | |
| 8761 | + | |
| 8762 | + | |
| 8763 | + | |
| 8764 | + | |
| 8765 | + | |
| 8766 | + | |
| 8767 | + | |
| 8768 | + | |
| 8769 | + | |
| 8770 | + | |
| 8771 | + | |
| 8772 | + | |
| 8773 | + | |
| 8774 | + | |
8714 | 8775 |
| |
8715 | 8776 |
| |
8716 | 8777 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1474 | 1474 |
| |
1475 | 1475 |
| |
1476 | 1476 |
| |
| 1477 | + | |
1477 | 1478 |
| |
1478 | 1479 |
| |
1479 | 1480 |
| |
|
Lines changed: 63 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2400 | 2400 |
| |
2401 | 2401 |
| |
2402 | 2402 |
| |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
2403 | 2466 |
| |
2404 | 2467 |
| |
2405 | 2468 |
| |
|
Lines changed: 36 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1594 | 1594 |
| |
1595 | 1595 |
| |
1596 | 1596 |
| |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
1597 | 1633 |
| |
1598 | 1634 |
| |
1599 | 1635 |
| |
|
0 commit comments
Comments
(0)