forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd1379eb
committed
Improve default and empty privilege outputs in psql.
Default privileges are represented as NULL::aclitem[] in catalog ACLcolumns, while revoking all privileges leaves an empty aclitem[].These two cases used to produce identical output in psql meta-commandslike \dp. Using something like "\pset null '(default)'" as aworkaround for spotting the difference did not work, because nullvalues were always displayed as empty strings by describe.c'smeta-commands.This patch improves that with two changes:1. Print "(none)" for empty privileges so that the user is able to distinguish them from default privileges, even without special workarounds.2. Remove the special handling of null values in describe.c, so that "\pset null" is honored like everywhere else. (This affects all output from these commands, not only ACLs.)The privileges shown by \dconfig+ and \ddp as well as the columnprivileges shown by \dp are not affected by change#1, because therespective aclitem[] is reset to NULL or deleted from the cataloginstead of leaving an empty array.Erik Wienhold and Laurenz AlbeDiscussion:https://postgr.es/m/1966228777.127452.1694979110595@office.mailbox.org1 parentbd86407 commitd1379eb
File tree
4 files changed
+115
-45
lines changed- doc/src/sgml
- src
- bin/psql
- test/regress
- expected
- sql
4 files changed
+115
-45
lines changedLines changed: 15 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1737 | 1737 |
| |
1738 | 1738 |
| |
1739 | 1739 |
| |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
1740 | 1745 |
| |
1741 | 1746 |
| |
1742 | 1747 |
| |
| |||
2049 | 2054 |
| |
2050 | 2055 |
| |
2051 | 2056 |
| |
2052 |
| - | |
| 2057 | + | |
2053 | 2058 |
| |
2054 | 2059 |
| |
2055 | 2060 |
| |
| |||
2375 | 2380 |
| |
2376 | 2381 |
| |
2377 | 2382 |
| |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
2378 | 2392 |
| |
2379 | 2393 |
| |
2380 | 2394 |
| |
|
0 commit comments
Comments
(0)