From: | Andreas Seltenreich <andreas+pg(at)gate450(dot)dyndns(dot)org> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Postgres Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Must be owner to truncate? |
Date: | 2005-08-24 05:01:00 |
Message-ID: | 87pss4c4j7.fsf@gate450.dyndns.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce Momjian schrob:
> Stephen Frost wrote:
> -- Start of PGP signed section.
>> * Jim C. Nasby (decibel(at)decibel(dot)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
--
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2005-08-24 05:03:49 | Re: beginning hackers (was: indexes spanning multiple |
Previous Message | Tom Lane | 2005-08-24 04:49:15 | Re: SHOW, RESET require quotes, SET doesn't |