forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit445035a
committed
Fix incorrect trigger-property updating in ALTER CONSTRAINT.
The code to change the deferrability properties of a foreign-key constraintupdated all the associated triggers to match; but a moment's examination ofthe code that creates those triggers in the first place shows that onlysome of them should track the constraint's deferrability properties. Thisleads to odd failures in subsequent exercise of the foreign key, as thetriggers are fired at the wrong times. Fix that, and add a regression testcomparing the trigger properties produced by ALTER CONSTRAINT with thoseyou get by creating the constraint as-intended to begin with.Per report from James Parks. Back-patch to 9.4 where this ALTERfunctionality was introduced.Report: <CAJ3Xv+jzJ8iNNUcp4RKW8b6Qp1xVAxHwSXVpjBNygjKxcVuE9w@mail.gmail.com>1 parent99f13d1 commit445035a
File tree
3 files changed
+119
-5
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+119
-5
lines changedLines changed: 26 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6740 | 6740 |
| |
6741 | 6741 |
| |
6742 | 6742 |
| |
| 6743 | + | |
6743 | 6744 |
| |
6744 | 6745 |
| |
| 6746 | + | |
| 6747 | + | |
| 6748 | + | |
| 6749 | + | |
| 6750 | + | |
| 6751 | + | |
| 6752 | + | |
| 6753 | + | |
| 6754 | + | |
| 6755 | + | |
| 6756 | + | |
| 6757 | + | |
| 6758 | + | |
| 6759 | + | |
| 6760 | + | |
| 6761 | + | |
| 6762 | + | |
| 6763 | + | |
| 6764 | + | |
| 6765 | + | |
| 6766 | + | |
| 6767 | + | |
6745 | 6768 |
| |
6746 | 6769 |
| |
6747 | 6770 |
| |
6748 |
| - | |
6749 |
| - | |
6750 |
| - | |
6751 |
| - | |
6752 |
| - | |
6753 | 6771 |
| |
6754 | 6772 |
| |
6755 | 6773 |
| |
| |||
7511 | 7529 |
| |
7512 | 7530 |
| |
7513 | 7531 |
| |
| 7532 | + | |
| 7533 | + | |
| 7534 | + | |
7514 | 7535 |
| |
7515 | 7536 |
| |
7516 | 7537 |
| |
|
Lines changed: 60 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
534 | 534 |
| |
535 | 535 |
| |
536 | 536 |
| |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 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 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
537 | 597 |
| |
538 | 598 |
| |
539 | 599 |
| |
|
Lines changed: 33 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
407 | 407 |
| |
408 | 408 |
| |
409 | 409 |
| |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
410 | 443 |
| |
411 | 444 |
| |
412 | 445 |
| |
|
0 commit comments
Comments
(0)