Re: TRUNCATE question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: TRUNCATE question
Дата
Msg-id 16591.996808348@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: TRUNCATE question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:
> Perhaps TRUNCATE should require superuser privilege, just to protect
> people from themselves?

Alternative possibilities came to mind just after I hit "send" ...

1. Refuse TRUNCATE if the table has any DELETE triggers.  (Are there
any other conditions to check for?)

2. If the table has DELETE triggers, allow TRUNCATE only to the
superuser.

Our current behavior is to allow TRUNCATE only to the table owner,
which seems to miss the point from a purely semantic point of view.
Anyone with DELETE privileges can do a universal DELETE, so why
shouldn't the faster alternative be available to them?

Does Oracle have any special permission checks for TRUNCATE?
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: TRUNCATE question
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: patch for contrib/intarray (current CVS)