From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Henk van Lingen <henkvl(at)cs(dot)uu(dot)nl> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: revoke all from public ? |
Date: | 2001-11-19 19:09:14 |
Message-ID: | 22258.1006196954@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Henk van Lingen <henkvl(at)cs(dot)uu(dot)nl> writes:
> Isn't ...../postgresql/doc/html/sql-revoke.html a bit misguiding
> saying:
> PUBLIC
> Rescind the specified privilege(s) for all users.
You're right, that's easily misread. I've added some wording to try
to clarify:
<para>
<command>REVOKE</command> allows the creator of an object to revoke
previously granted permissions from one or more users or groups of users.
The key word <literal>PUBLIC</literal> refers to the implicitly defined
group of all users.
</para>
<para>
Note that any particular user will have the sum
of privileges granted directly to him, privileges granted to any group he
is presently a member of, and privileges granted to
<literal>PUBLIC</literal>. Thus, for example, revoking SELECT privilege
from <literal>PUBLIC</literal> does not necessarily mean that all users
have lost SELECT privilege on the object: those who have it granted
directly or via a group will still have it.
</para>
> Anyways, thanx, i'll look for another way to revoke all permissions.
I'm afraid you have to do it retail: if you GRANTed anything to user
joe, you have to REVOKE FROM joe. There's no easy shortcut.
Well ... hmm ... it would probably work to do
UPDATE pg_class SET relacl = NULL WHERE relname = 'mytable';
which should revert the permissions on mytable to the default state.
Pretty ugly though, and not guaranteed to work the same in future releases.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-11-19 19:10:59 | Re: Packages for RH7.2 |
Previous Message | Andrew G. Hammond | 2001-11-19 18:49:41 | Re: One time only trigger/function on every row... |