- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit40b449a
committed
Allow CREATE EXTENSION to follow extension update paths.
Previously, to update an extension you had to produce both a version-updatescript and a new base installation script. It's become more and moreobvious that that's tedious, duplicative, and error-prone. This patchattempts to improve matters by allowing the new base installation scriptto be omitted. CREATE EXTENSION will install a requested version if itcan find a base script and a chain of update scripts that will get there.As in the existing update logic, shorter chains are preferred if there'smore than one possibility, with an arbitrary tie-break rule for chainsof equal length.Also adjust the pg_available_extension_versions view to show such versionsas installable.While at it, refactor the code so that CASCADE processing works forextensions requested during ApplyExtensionUpdates(). Without this,addition of a new requirement in an updated extension would requirecreating a new base script, even if there was no other reason to do that.(It would be easy at this point to add a CASCADE option to ALTER EXTENSIONUPDATE, to allow the same thing to happen during a manually-commandedversion update, but I have not done that here.)Tom Lane, reviewed by Andres FreundDiscussion: <20160905005919.jz2m2yh3und2dsuy@alap3.anarazel.de>1 parent28e5e56 commit40b449a
2 files changed
+439
-210
lines changedLines changed: 41 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
885 | 885 |
| |
886 | 886 |
| |
887 | 887 |
| |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
888 | 929 |
| |
889 | 930 |
| |
890 | 931 |
| |
|
0 commit comments
Comments
(0)