Re: trigger for TRUNCATE?

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: trigger for TRUNCATE?
Дата
Msg-id 1199994824.4266.851.camel@ebony.site
обсуждение исходный текст
Ответ на trigger for TRUNCATE?  (Gerardo Herzig <gherzig@fmed.uba.ar>)
Список pgsql-sql
Alvaro Herrera wrote: 
> My thinking is that a TRUNCATE trigger is a per-statement trigger which
> doesn't have access to the set of deleted rows.

> In that way it would be different from a per-statement trigger for
> DELETE.

Completely agree.

A truncate trigger should run a different function to a delete trigger. 

This is an important feature for trigger-based replication systems. Not
just slony, but bucardo and others too. It's an embarrassing hole in our
high availability capabilities and we really need to fill the gap. We
can't always control whether an application will issue truncates or
not. 

Rather spookily that's what I've been working on this afternoon, though
I didn't realise this thread was in progress until now, nor did I
realise there might be possible objections. I do hope the importance of
it is enough to overcome objections.

Yes, it does look fairly straightforward. Should be ready for when 8.4
opens, assuming we agree.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: trigger for TRUNCATE?
Следующее
От: James Cloos
Дата:
Сообщение: Escape sequence for UTF-8 Character Literals?