AFTER UPDATE trigger updating other records

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема AFTER UPDATE trigger updating other records
Дата
Msg-id CAKFQuwbYTA1TzKw0pXrup8D3TZL_O6aWwd8YcM108Cu4bWLudg@mail.gmail.com
обсуждение исходный текст
Ответ на AFTER UPDATE trigger updating other records  (Ian Harding <harding.ian@gmail.com>)
Ответы Re: AFTER UPDATE trigger updating other records  (Ian Harding <harding.ian@gmail.com>)
Список pgsql-general
On Wednesday, January 24, 2018, Ian Harding <harding.ian@gmail.com> wrote:

-- This is not what I expect to see.  I have even tried running the update
-- unrestricted from within the trigger but I get the same result.  From
-- outside the trigger I run the update unrestricted...

UPDATE area SET areapath = (select areapath from area a where areaid = area.parentid) || subpath(areapath, nlevel(areapath) - 1) where parentid is not null;

-- And I see what I expected.


I'd start thinking that the function that the trigger is executing is not the one that I am editing.  Adding raise notice to the function should give you some confirmation as to what is firing.

Are rows beside the one your are updating not changing or not changing correctly.

A self-contained example script would help you with isolation and us if you still cannot figure it out after writing one.

David J.

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: AFTER UPDATE trigger updating other records
Следующее
От: support-tiger
Дата:
Сообщение: pg 10.1 missing libpq in postgresql-devel