Re: BEFORE ... Statement-level trigger
От | Adrian Klaver |
---|---|
Тема | Re: BEFORE ... Statement-level trigger |
Дата | |
Msg-id | 6241dc72-4291-0713-1a3e-97b4f006e933@aklaver.com обсуждение исходный текст |
Ответ на | BEFORE ... Statement-level trigger (Jitendra Loyal <jitendra.loyal@gmail.com>) |
Ответы |
Re: BEFORE ... Statement-level trigger
|
Список | pgsql-general |
On 2/18/19 9:11 AM, Jitendra Loyal wrote: > I have gone through the documentation quite a number of times to > establish the understanding. However, I had been wondering about the > recursion in the case I put forth. > > Is there a better way to handle this requirement? The point is that the > trigger is being called when no rows are affected. Well as the docs say a FOR EACH STATEMENT trigger will execute in the absence of changed rows. So you have two options: 1) Use a FOR EACH ROW trigger. 2) Do what you did and include a sanity check. Best guess is your AFTER STATEMENT trigger is tripping your BEFORE ROW trigger which then trips your AFTER STATEMENT and so on. > > Thanks and regards, > Jiten -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: