Re: BUG #6021: There is no difference between default and empty access privileges with \dp

From: Grzegorz Szpetkowski <gszpetkowski(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6021: There is no difference between default and empty access privileges with \dp
Date: 2011-05-12 22:49:58
Message-ID: BANLkTi=-Gsdd2d6QFCqYwUET1zCNSY9=eQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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=arwdxt/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(at)sss(dot)pgh(dot)pa(dot)us>:
> "psql \dp showing empty Access privileges column for {}" <gszpetkowski(at)gmail(dot)com> writes:
>> Description:        There is no difference between default and empty access
>> privileges with \dp
>
> Yeah.  It'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:
>
>        COALESCE(array_to_string(c.relacl, E'\n'), 'default')
>
> But that might be too big a change.  Or 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.
>
>                        regards, tom lane
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Grzegorz Szpetkowski 2011-05-12 23:45:56 Re: BUG #6021: There is no difference between default and empty access privileges with \dp
Previous Message Tom Lane 2011-05-12 22:46:40 Re: Re: Bug with STABLE function using the wrong snapshot (probably during planning)