Re: sql_drop Event Trigger

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: sql_drop Event Trigger
Дата
Msg-id CA+TgmoYBEujrS6krQ4s9pYDNwQ0EcGQfr87pkQMT8mKpQ0riSA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: sql_drop Event Trigger  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: sql_drop Event Trigger  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On Thu, Feb 21, 2013 at 12:25 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> There's also code to re-obtain the list of objects to drop after the
>> event trigger functions have run; the second list is compared to the
>> first one, and if they differ, an error is raised.
>
> This is definitely an improvement.  I am not 100% clear on whether
> this is sufficient, but it sure seems a lot better than punting.

What if the object that gets whacked around is one of the named
objects rather than some dependency thereof?  Suppose for example that
the event trigger drops the same object that the user tried to drop.
We need to error out cleanly in that case, not blindly proceed with
the drop.

(In the worst case, somebody could create an unrelated object with the
same OID and we could latch onto and drop that one.  Seems remote
unless the user has a way to fiddle with the OID counter, but if it
happened it would be bad.)

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: relpath() to src/common
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [DOCS] Contrib module "xml2" status