Re: BUG #6021: There is no difference between default and empty access privileges with \dp - Mailing list pgsql-bugs

From Grzegorz Szpetkowski
Subject Re: BUG #6021: There is no difference between default and empty access privileges with \dp
Date
Msg-id BANLkTi=d+jASUU=rK=tH2ub=8Am3oyJ9aw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #6021: There is no difference between default and empty access privileges with \dp  (Grzegorz Szpetkowski <gszpetkowski@gmail.com>)
Responses Re: BUG #6021: There is no difference between default and empty access privileges with \dp
List pgsql-bugs
I see that I just confused old PostgreSQL 8.3 curly bracket behaviour
with new 8.4/9.0 (I am using 8.3 all the time):

http://www.postgresql.org/docs/8.3/static/sql-grant.html
http://www.postgresql.org/docs/9.0/static/sql-grant.html

That's why I felt some misunderstanding with my previous post.

Regards,
Grzegorz Szpetkowski

2011/5/13 Grzegorz Szpetkowski <gszpetkowski@gmail.com>:
> What about changing empty value in \dp (\z) to {} when priviliges are
> really empty and leave column empty for default priviliges as it works
> now. I mean the same behaviour as in relacl column in pg_class catalog
> ? It sound simplest for me:
>
> empty string - default privileges
> {} - no privileges
> {postgres=3Darwdxt/postgres} - some privileges
>
> "If the "Access privileges" column is empty for a given object, it
> means the object has default privileges (that is, its privileges
> column is null)."
>
> from: http://www.postgresql.org/docs/9.0/static/sql-grant.html
>
> I agree that "default" sounds more descriptive than "", but empty
> string works for me too (especially with clear documentation on that).
>
> Regards,
> Grzegorz Szpetkowski
>
> 2011/5/13 Tom Lane <tgl@sss.pgh.pa.us>:
>> "psql \dp showing empty Access privileges column for {}" <gszpetkowski@g=
mail.com> writes:
>>> Description: =A0 =A0 =A0 =A0There is no difference between default and =
empty access
>>> privileges with \dp
>>
>> Yeah. =A0It's been like that since forever, and nobody's complained
>> before, possibly because revoking all privileges for everybody isn't
>> a particularly useful real-world case.
>>
>> One possibility is to start showing "default" when the ACL is null,
>> which would be quite easy to implement:
>>
>> =A0 =A0 =A0 =A0COALESCE(array_to_string(c.relacl, E'\n'), 'default')
>>
>> But that might be too big a change. =A0Or we could take the opposite
>> tack of changing the display in the no-privileges case; but I don't
>> see a similarly compact way to do that.
>>
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0regards, tom lane
>>
>

pgsql-bugs by date:

Previous
From: Grzegorz Szpetkowski
Date:
Subject: Re: BUG #6021: There is no difference between default and empty access privileges with \dp
Next
From: Tom Lane
Date:
Subject: Re: BUG #6021: There is no difference between default and empty access privileges with \dp