forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd65ddac
committed
Add psql \drg command to display role grants.
With the addition of INHERIT and SET options for role grants,the historical display of role memberships in \du/\dg is woefullyinadequate. Besides those options, there are pre-existingshortcomings that you can't see the ADMIN option nor the grantor.To fix this, remove the "Member of" column from \du/\dg altogether(making that output usefully narrower), and invent a new meta-command"\drg" that is specifically for displaying role memberships. Itshows one row for each role granted to the selected role(s), withthe grant options and grantor.We would not normally back-patch such a feature addition postfeature freeze, but in this case the change is mainly driven byv16 changes in the server, so it seems appropriate to include itin v16.Pavel Luzanov, with bikeshedding and review from a lot of people,but particularly David JohnstonDiscussion:https://postgr.es/m/b9be2d0e-a9bc-0a30-492f-a4f68e4f7740@postgrespro.ru1 parent15c68cd commitd65ddac
File tree
8 files changed
+175
-18
lines changed- doc/src/sgml/ref
- src
- bin/psql
- test/regress
- expected
- sql
8 files changed
+175
-18
lines changedLines changed: 22 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1883 | 1883 |
| |
1884 | 1884 |
| |
1885 | 1885 |
| |
| 1886 | + | |
1886 | 1887 |
| |
1887 | 1888 |
| |
1888 | 1889 |
| |
| |||
1905 | 1906 |
| |
1906 | 1907 |
| |
1907 | 1908 |
| |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
1908 | 1930 |
| |
1909 | 1931 |
| |
1910 | 1932 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
918 | 918 |
| |
919 | 919 |
| |
920 | 920 |
| |
| 921 | + | |
| 922 | + | |
921 | 923 |
| |
922 | 924 |
| |
923 | 925 |
| |
|
Lines changed: 74 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3617 | 3617 |
| |
3618 | 3618 |
| |
3619 | 3619 |
| |
3620 |
| - | |
| 3620 | + | |
3621 | 3621 |
| |
3622 | 3622 |
| |
3623 | 3623 |
| |
| |||
3631 | 3631 |
| |
3632 | 3632 |
| |
3633 | 3633 |
| |
3634 |
| - | |
3635 |
| - | |
3636 |
| - | |
3637 |
| - | |
3638 |
| - | |
| 3634 | + | |
3639 | 3635 |
| |
3640 | 3636 |
| |
3641 | 3637 |
| |
| |||
3675 | 3671 |
| |
3676 | 3672 |
| |
3677 | 3673 |
| |
3678 |
| - | |
3679 |
| - | |
3680 | 3674 |
| |
3681 | 3675 |
| |
3682 | 3676 |
| |
| |||
3701 | 3695 |
| |
3702 | 3696 |
| |
3703 | 3697 |
| |
3704 |
| - | |
| 3698 | + | |
3705 | 3699 |
| |
3706 | 3700 |
| |
3707 | 3701 |
| |
3708 |
| - | |
| 3702 | + | |
3709 | 3703 |
| |
3710 | 3704 |
| |
3711 | 3705 |
| |
| |||
3735 | 3729 |
| |
3736 | 3730 |
| |
3737 | 3731 |
| |
3738 |
| - | |
3739 |
| - | |
3740 | 3732 |
| |
3741 |
| - | |
| 3733 | + | |
3742 | 3734 |
| |
3743 | 3735 |
| |
3744 | 3736 |
| |
| |||
3831 | 3823 |
| |
3832 | 3824 |
| |
3833 | 3825 |
| |
| 3826 | + | |
| 3827 | + | |
| 3828 | + | |
| 3829 | + | |
| 3830 | + | |
| 3831 | + | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
| 3835 | + | |
| 3836 | + | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
| 3859 | + | |
| 3860 | + | |
| 3861 | + | |
| 3862 | + | |
| 3863 | + | |
| 3864 | + | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
| 3872 | + | |
| 3873 | + | |
| 3874 | + | |
| 3875 | + | |
| 3876 | + | |
| 3877 | + | |
| 3878 | + | |
| 3879 | + | |
| 3880 | + | |
| 3881 | + | |
| 3882 | + | |
| 3883 | + | |
| 3884 | + | |
| 3885 | + | |
| 3886 | + | |
| 3887 | + | |
| 3888 | + | |
| 3889 | + | |
| 3890 | + | |
| 3891 | + | |
| 3892 | + | |
| 3893 | + | |
| 3894 | + | |
3834 | 3895 |
| |
3835 | 3896 |
| |
3836 | 3897 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 |
| |
41 | 44 |
| |
42 | 45 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
280 | 280 |
| |
281 | 281 |
| |
282 | 282 |
| |
| 283 | + | |
283 | 284 |
| |
284 | 285 |
| |
285 | 286 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1713 | 1713 |
| |
1714 | 1714 |
| |
1715 | 1715 |
| |
1716 |
| - | |
| 1716 | + | |
1717 | 1717 |
| |
1718 | 1718 |
| |
1719 | 1719 |
| |
| |||
4760 | 4760 |
| |
4761 | 4761 |
| |
4762 | 4762 |
| |
4763 |
| - | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
4764 | 4766 |
| |
4765 | 4767 |
| |
4766 | 4768 |
| |
|
Lines changed: 43 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6187 | 6187 |
| |
6188 | 6188 |
| |
6189 | 6189 |
| |
6190 |
| - | |
6191 |
| - | |
6192 |
| - | |
| 6190 | + | |
| 6191 | + | |
| 6192 | + | |
6193 | 6193 |
| |
6194 | 6194 |
| |
6195 | 6195 |
| |
| |||
6618 | 6618 |
| |
6619 | 6619 |
| |
6620 | 6620 |
| |
| 6621 | + | |
| 6622 | + | |
| 6623 | + | |
| 6624 | + | |
| 6625 | + | |
| 6626 | + | |
| 6627 | + | |
| 6628 | + | |
| 6629 | + | |
| 6630 | + | |
| 6631 | + | |
| 6632 | + | |
| 6633 | + | |
| 6634 | + | |
| 6635 | + | |
| 6636 | + | |
| 6637 | + | |
| 6638 | + | |
| 6639 | + | |
| 6640 | + | |
| 6641 | + | |
| 6642 | + | |
| 6643 | + | |
| 6644 | + | |
| 6645 | + | |
| 6646 | + | |
| 6647 | + | |
| 6648 | + | |
| 6649 | + | |
| 6650 | + | |
| 6651 | + | |
| 6652 | + | |
| 6653 | + | |
| 6654 | + | |
| 6655 | + | |
| 6656 | + | |
| 6657 | + | |
| 6658 | + | |
| 6659 | + | |
| 6660 | + |
Lines changed: 26 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1823 | 1823 |
| |
1824 | 1824 |
| |
1825 | 1825 |
| |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + |
0 commit comments
Comments
(0)