Re: Determining if a table really changed in a trigger

Поиск
Список
Период
Сортировка
От Mitar
Тема Re: Determining if a table really changed in a trigger
Дата
Msg-id CAKLmikPDTCZPuY=3bgtkZgXbVy8bfyrA_OYM0dNp4Pu2Viat-A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Determining if a table really changed in a trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi!

On Sat, Nov 6, 2021 at 2:43 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Mitar <mmitar@gmail.com> writes:
> > Anyone? Any way to determine the number of affected rows in a statement trigger?
>
> Check the size of the transition relation.

Yes, this is what we are currently doing, but it looks very
inefficient if you want just the number, no? Or even if you want to
know if it is non-zero or zero.


Mitar

-- 
http://mitar.tnode.com/
https://twitter.com/mitar_m



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Determining if a table really changed in a trigger
Следующее
От: Erik Wienhold
Дата:
Сообщение: Design database schemas around a common subset of objects