Re: Must be owner to truncate?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Must be owner to truncate?
Дата
Msg-id 20228.1120758539@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Must be owner to truncate?  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Must be owner to truncate?  (Stephen Frost <sfrost@snowman.net>)
Re: Must be owner to truncate?  ("Jim C. Nasby" <decibel@decibel.org>)
Re: Must be owner to truncate?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
>   The current permissions checks for truncate seem to be excessive.  It
>   requires that you're the owner of the relation instead of requiring
>   that you have delete permissions on the relation.  It was pointed out
>   that truncate doesn't call triggers but it seems like that would be
>   something easy enough to check for.

There are other reasons for restricting it:* truncate takes a much stronger lock than a plain delete does.* truncate is
notMVCC-safe.
 

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.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Checkpoint cost, looks like it is WAL/CRC
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Must be owner to truncate?