Re: Single Row Table? - Mailing list pgsql-general

From Tom Lane
Subject Re: Single Row Table?
Date
Msg-id 15132.1093985944@sss.pgh.pa.us
Whole thread Raw
In response to Re: Single Row Table?  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: Single Row Table?  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-general
Thomas Kellerer <spam_eater@gmx.net> writes:
> That was one of my first guesses as well, but then I'm not sure if you can
> revoke DELETE and INSERT privilege from the owner of the table...

In Postgres you can do this, although I think it's contrary to the
restrictions of the SQL spec, so it might not work in other DBs.

The reason is that Postgres treats the owner's ordinary privileges
as having been granted by the owner to himself; therefore he can revoke
'em too.  The SQL spec treats the owner's privileges as having been
granted by the mystical entity "_SYSTEM"; not being "_SYSTEM", the owner
cannot revoke them.

Since it's obviously useful to be able to make a read-only table,
I think that the spec has missed a bet here.

            regards, tom lane

pgsql-general by date:

Previous
From: Joe Conway
Date:
Subject: Re: Large Databases
Next
From: Thomas Kellerer
Date:
Subject: Re: Single Row Table?