forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6c2e734
committed
Refactor ALTER EXTENSION UPDATE to have cleaner multi-step semantics.
This change causes a multi-step update sequence to behave exactly as if theupdates had been commanded one at a time, including updating the "requires"dependencies afresh at each step. The initial implementation took theshortcut of examining only the final target version's "requires" andchanging the catalog entry but once. But on reflection that's a bad idea,since it could lead to executing old update scripts under conditionsdifferent than they were designed/tested for. Better to expend a few extracycles and avoid any surprises.In the same spirit, if a CREATE EXTENSION FROM operation involves applyinga series of update files, it will act as though the CREATE had first beendone using the initial script's target version and then the additionalscripts were invoked with ALTER EXTENSION UPDATE.I also removed the restriction about not changing encoding in secondarycontrol files. The new rule is that a script is assumed to be in whateverencoding the control file(s) specify for its target version. Since thisreimplementation causes us to read each intermediate version's controlfile, there's no longer any uncertainty about which encoding setting wouldget applied.1 parent0de0cc1 commit6c2e734
2 files changed
+252
-144
lines changedLines changed: 9 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
482 | 482 |
| |
483 | 483 |
| |
484 | 484 |
| |
485 |
| - | |
486 |
| - | |
487 |
| - | |
488 |
| - | |
| 485 | + | |
| 486 | + | |
489 | 487 |
| |
490 | 488 |
| |
491 | 489 |
| |
| |||
689 | 687 |
| |
690 | 688 |
| |
691 | 689 |
| |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
692 | 696 |
| |
693 | 697 |
| |
694 | 698 |
| |
| |||
808 | 812 |
| |
809 | 813 |
| |
810 | 814 |
| |
811 |
| - | |
| 815 | + | |
812 | 816 |
| |
813 | 817 |
| |
814 | 818 |
| |
|
0 commit comments
Comments
(0)