Re: Must be owner to truncate? - Mailing list pgsql-hackers

From Andreas Seltenreich
Subject Re: Must be owner to truncate?
Date
Msg-id 87pss4c4j7.fsf@gate450.dyndns.org
Whole thread Raw
In response to Re: Must be owner to truncate?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Must be owner to truncate?  (Manfred Koizar <mkoi-pg@aon.at>)
Re: Must be owner to truncate?  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Bruce Momjian schrob:

> Stephen Frost wrote:
> -- Start of PGP signed section.
>> * Jim C. Nasby (decibel@decibel.org) wrote:
>> > On Thu, Jul 07, 2005 at 01:48:59PM -0400, Tom Lane wrote:
>> > > I don't really agree with the viewpoint that truncate is just a quick
>> > > DELETE, and so I do not agree that DELETE permissions should be enough
>> > > to let you do a TRUNCATE.
>> > 
>> > What about adding a truncate permission? I would find it useful, as it
>> > seems would others.
>> 
>> That would be acceptable for me as well.  I'd prefer it just work off
>> delete, but as long as I can grant truncate to someone w/o giving them
>> ownership rights on the table I'd be happy.
>
> Added to TODO:
>
>     * Add TRUNCATE permission
>     
>       Currently only the owner can TRUNCATE a table because triggers are not
>       called, and the table is locked in exclusive mode.

Is anyone working on this yet? I looked at the code involved, and it
seems there are just a couple of lines needed, some regression test
and documentation updates, and most importantly, tab-completion
updates.

However, a question arose quickly: According to the standard, revoking
INSERT, UPDATE and DELETE after GRANT ALL PRIVILEGES would leave the
relation read-only, but with the TRUNCATE privilege lying around, this
would no longer be true for PostgreSQL. Would this open a security
hole or is it okay as far as extensions to the standard go?

regards,
Andreas
-- 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: SHOW, RESET require quotes, SET doesn't
Next
From: "Jim C. Nasby"
Date:
Subject: Re: beginning hackers (was: indexes spanning multiple