Re: Usability fail with psql's \dp command

2018-08-01 Thread Pavel Luzanov
Fabien, On 31.07.2018 22:02, Fabien COELHO wrote: Indeed, all \d* which display perms have the empty/default confusion:   \dp \ddp \des \dew \l \dn \db \df \dT \dD \dL I fixed them all to display the default acl in the patch I just sent. I also noticed that although large objects have permiss

Re: Usability fail with psql's \dp command

2018-07-31 Thread Isaac Morland
On 31 July 2018 at 15:02, Fabien COELHO wrote: [] > Indeed, all \d* which display perms have the empty/default confusion: > > \dp \ddp \des \dew \l \dn \db \df \dT \dD \dL > > I fixed them all to display the default acl in the patch I just sent. > > I also noticed that although large object

Re: Usability fail with psql's \dp command

2018-07-31 Thread Fabien COELHO
Hello Pavel, I noticed today that \dp does not distinguish empty acl fields (meaning nobody has any privileges) from null acl fields (which mean default privileges, typically not empty). This confusing behavior exists not only for \dp command. Consider schemas and \dn+ command: Indeed, all

Re: Usability fail with psql's \dp command

2018-07-31 Thread Fabien COELHO
One idea is to replace a null ACL value with the actual effective permissions, which we could get from the acldefault() function. However, acldefault() only exists since 9.2, and in any case I'm afraid that might be perceived as mostly clutter. Here is an poc implementation of this which does

Re: Usability fail with psql's \dp command

2018-07-31 Thread Pavel Luzanov
On 28.07.2018 21:41, Tom Lane wrote: I noticed today that \dp does not distinguish empty acl fields (meaning nobody has any privileges) from null acl fields (which mean default privileges, typically not empty). This confusing behavior exists not only for \dp command. Consider schemas and \dn+ co

Re: Usability fail with psql's \dp command

2018-07-31 Thread David G. Johnston
On Tue, Jul 31, 2018 at 7:24 AM, Robert Haas wrote: > On Sat, Jul 28, 2018 at 4:36 PM, David Fetter wrote: > > Please find attached a patch to fix this. Would this be a > > back-patchable bug? > > In my view, this is not a bug fix, but an improvement, and therefore > should not be back-patched.

Re: Usability fail with psql's \dp command

2018-07-31 Thread Robert Haas
On Sat, Jul 28, 2018 at 4:36 PM, David Fetter wrote: > Please find attached a patch to fix this. Would this be a > back-patchable bug? In my view, this is not a bug fix, but an improvement, and therefore should not be back-patched. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The E

Re: Usability fail with psql's \dp command

2018-07-30 Thread Fabien COELHO
Hello Kyotaro-san, Note that 'No privileges' could be somehow interpreted as "default privileges" (no "special/given" privileges) or as "no permissions at all", so there is still some ambiguity, at least for me. FWIW "No privileges" seems to me as "The user cannot access it at all" with no a

Re: Usability fail with psql's \dp command

2018-07-29 Thread Kyotaro HORIGUCHI
Hello. At Sun, 29 Jul 2018 21:34:29 -0400 (EDT), Fabien COELHO wrote in > > >> My 0.02¤: this creates an exception for anyone trying to parse the > >> output. > >> I would have preferred empty logically meaning no rights, and the > >> default > >> being spelled out explicitely. > > > > Uh, who

Re: Usability fail with psql's \dp command

2018-07-29 Thread Fabien COELHO
My 0.02¤: this creates an exception for anyone trying to parse the output. I would have preferred empty logically meaning no rights, and the default being spelled out explicitely. Uh, who'd be trying to parse the output of \dp? Ok. Maybe humans? Note that 'No privileges' could be somehow in

Re: Usability fail with psql's \dp command

2018-07-28 Thread Tom Lane
Fabien COELHO writes: > My 0.02¤: this creates an exception for anyone trying to parse the output. > I would have preferred empty logically meaning no rights, and the default > being spelled out explicitely. Uh, who'd be trying to parse the output of \dp? The reason we provide psql's -E option

Re: Usability fail with psql's \dp command

2018-07-28 Thread David Fetter
On Sat, Jul 28, 2018 at 08:11:17PM -0400, Fabien COELHO wrote: > > >>So those are definitely different privilege states, but they look > >>the same. > > > >Please find attached a patch to fix this. Would this be a > >back-patchable bug? > > My 0.02€: this creates an exception for anyone trying t

Re: Usability fail with psql's \dp command

2018-07-28 Thread Fabien COELHO
So those are definitely different privilege states, but they look the same. Please find attached a patch to fix this. Would this be a back-patchable bug? My 0.02€: this creates an exception for anyone trying to parse the output. I would have preferred empty logically meaning no rights, and

Re: Usability fail with psql's \dp command

2018-07-28 Thread David Fetter
On Sat, Jul 28, 2018 at 02:41:24PM -0400, Tom Lane wrote: > I noticed today that \dp does not distinguish empty acl fields > (meaning nobody has any privileges) from null acl fields > (which mean default privileges, typically not empty). > For instance > > regression=# \c joe joe > You are now con

Re: Usability fail with psql's \dp command

2018-07-28 Thread Dmitry Igrishin
> > > What do people think of printing "Default" if the ACL is null? > > Alternatively, since the state with an empty ACL is certainly > the unusual case, maybe we should mark that specially, perhaps > by printing "None" or "No privileges". Old problem. +1.

Re: Usability fail with psql's \dp command

2018-07-28 Thread Christophe Pettus
> On Jul 28, 2018, at 11:41, Tom Lane wrote: > > Alternatively, since the state with an empty ACL is certainly > the unusual case, maybe we should mark that specially, perhaps > by printing "None" or "No privileges". +1 for "No privileges". I was just bitted by that this week. -- -- Christo