- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit50fc694
committed
Invent "trusted" extensions, and remove the pg_pltemplate catalog.
This patch creates a new extension property, "trusted". An extensionthat's marked that way in its control file can be installed by anon-superuser who has the CREATE privilege on the current database,even if the extension contains objects that normally would have to becreated by a superuser. The objects within the extension will (bydefault) be owned by the bootstrap superuser, but the extension itselfwill be owned by the calling user. This allows replicating the oldbehavior around trusted procedural languages, without all thespecial-case logic in CREATE LANGUAGE. We have, however, chosen toloosen the rules slightly: formerly, only a database owner could takeadvantage of the special case that allowed installation of a trustedlanguage, but now anyone who has CREATE privilege can do so.Having done that, we can delete the pg_pltemplate catalog, moving theknowledge it contained into the extension script files for the variousPLs. This ends up being no change at all for the in-core PLs, but it isa large step forward for external PLs: they can now have the same easeof installation as core PLs do. The old "trusted PL" behavior was onlyavailable to PLs that had entries in pg_pltemplate, but now anyextension can be marked trusted if appropriate.This also removes one of the stumbling blocks for our Python 2 -> 3migration, since the association of "plpythonu" with Python 2 is nolonger hard-wired into pg_pltemplate's initial contents. Exactly wherewe go from here on that front remains to be settled, but one problemis fixed.Patch by me, reviewed by Peter Eisentraut, Stephen Frost, and others.Discussion:https://postgr.es/m/5889.1566415762@sss.pgh.pa.us1 parent166ab9c commit50fc694
File tree
41 files changed
+587
-786
lines changed- doc/src/sgml
- ref
- src
- backend
- catalog
- commands
- parser
- bin
- pg_dump
- pg_upgrade
- include
- catalog
- commands
- pl
- plperl
- expected
- sql
- plpgsql/src
- plpython
- tcl
- test/regress/expected
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+587
-786
lines changedLines changed: 9 additions & 113 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
225 | 225 |
| |
226 | 226 |
| |
227 | 227 |
| |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 | 228 |
| |
234 | 229 |
| |
235 | 230 |
| |
| |||
4911 | 4906 |
| |
4912 | 4907 |
| |
4913 | 4908 |
| |
4914 |
| - | |
4915 |
| - | |
4916 |
| - | |
4917 |
| - | |
4918 |
| - | |
4919 |
| - | |
4920 |
| - | |
4921 |
| - | |
4922 |
| - | |
4923 |
| - | |
4924 |
| - | |
4925 |
| - | |
4926 |
| - | |
4927 |
| - | |
4928 |
| - | |
4929 |
| - | |
4930 |
| - | |
4931 |
| - | |
4932 |
| - | |
4933 |
| - | |
4934 |
| - | |
4935 |
| - | |
4936 |
| - | |
4937 |
| - | |
4938 |
| - | |
4939 |
| - | |
4940 |
| - | |
4941 |
| - | |
4942 |
| - | |
4943 |
| - | |
4944 |
| - | |
4945 |
| - | |
4946 |
| - | |
4947 |
| - | |
4948 |
| - | |
4949 |
| - | |
4950 |
| - | |
4951 |
| - | |
4952 |
| - | |
4953 |
| - | |
4954 |
| - | |
4955 |
| - | |
4956 |
| - | |
4957 |
| - | |
4958 |
| - | |
4959 |
| - | |
4960 |
| - | |
4961 |
| - | |
4962 |
| - | |
4963 |
| - | |
4964 |
| - | |
4965 |
| - | |
4966 |
| - | |
4967 |
| - | |
4968 |
| - | |
4969 |
| - | |
4970 |
| - | |
4971 |
| - | |
4972 |
| - | |
4973 |
| - | |
4974 |
| - | |
4975 |
| - | |
4976 |
| - | |
4977 |
| - | |
4978 |
| - | |
4979 |
| - | |
4980 |
| - | |
4981 |
| - | |
4982 |
| - | |
4983 |
| - | |
4984 |
| - | |
4985 |
| - | |
4986 |
| - | |
4987 |
| - | |
4988 |
| - | |
4989 |
| - | |
4990 |
| - | |
4991 |
| - | |
4992 |
| - | |
4993 |
| - | |
4994 |
| - | |
4995 |
| - | |
4996 |
| - | |
4997 |
| - | |
4998 |
| - | |
4999 |
| - | |
5000 |
| - | |
5001 |
| - | |
5002 |
| - | |
5003 |
| - | |
5004 |
| - | |
5005 |
| - | |
5006 |
| - | |
5007 |
| - | |
5008 |
| - | |
5009 |
| - | |
5010 |
| - | |
5011 |
| - | |
5012 |
| - | |
5013 |
| - | |
5014 |
| - | |
5015 |
| - | |
5016 |
| - | |
5017 |
| - | |
5018 |
| - | |
5019 |
| - | |
5020 |
| - | |
5021 | 4909 |
| |
5022 | 4910 |
| |
5023 | 4911 |
| |
| |||
8519 | 8407 |
| |
8520 | 8408 |
| |
8521 | 8409 |
| |
8522 |
| - | |
| 8410 | + | |
| 8411 | + | |
| 8412 | + | |
| 8413 | + | |
| 8414 | + | |
| 8415 | + | |
| 8416 | + | |
| 8417 | + | |
| 8418 | + | |
8523 | 8419 |
| |
8524 | 8420 |
| |
8525 | 8421 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1742 | 1742 |
| |
1743 | 1743 |
| |
1744 | 1744 |
| |
| 1745 | + | |
1745 | 1746 |
| |
1746 | 1747 |
| |
1747 | 1748 |
| |
| |||
1753 | 1754 |
| |
1754 | 1755 |
| |
1755 | 1756 |
| |
1756 |
| - | |
1757 |
| - | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
1758 | 1762 |
| |
1759 | 1763 |
| |
1760 | 1764 |
| |
|
Lines changed: 37 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
576 | 576 |
| |
577 | 577 |
| |
578 | 578 |
| |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
579 | 604 |
| |
580 | 605 |
| |
581 | 606 |
| |
| |||
641 | 666 |
| |
642 | 667 |
| |
643 | 668 |
| |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
644 | 681 |
| |
645 | 682 |
| |
646 | 683 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
156 |
| - | |
| 156 | + | |
157 | 157 |
| |
158 | 158 |
| |
159 | 159 |
| |
|
Lines changed: 14 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 |
| - | |
51 |
| - | |
52 |
| - | |
53 | 50 |
| |
54 | 51 |
| |
55 | 52 |
| |
56 | 53 |
| |
57 | 54 |
| |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
58 | 69 |
| |
59 | 70 |
| |
60 | 71 |
| |
|
0 commit comments
Comments
(0)