Re: truncate in combination with deferred triggers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: truncate in combination with deferred triggers
Дата
Msg-id 19994.1156194738@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: truncate in combination with deferred triggers  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Ответы Re: truncate in combination with deferred triggers  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Re: truncate in combination with deferred triggers  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> Yeah, I think there are a few possibilities around truncate inside a
> savepoint that's rolledback that we have to be careful of.

Yuck :-(

> If we could mark the entries in some way so we knew whether or not they
> were made obsolete by a truncate of our own tranasaction or a committed or
> rolled back past subtransaction of ours, we could probably make both of
> these work nicely.

That seems much more trouble than it's worth, unless someone can
convince me that this isn't a corner case with little real-world value.

Furthermore, this still doesn't address the worry about whether there
are cases where dropping the trigger calls would be inappropriate.

I propose just having TRUNCATE check for pending triggers on the
target tables, and throw an error if there are any.

            regards, tom lane

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: truncate in combination with deferred triggers
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: truncate in combination with deferred triggers