Re: trigger fails

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: trigger fails
Дата
Msg-id CAKFQuwZt-hZj8_p4=hcZ5tWAYw1ZMwkiDiDNTtznmsASYpuZig@mail.gmail.com
обсуждение исходный текст
Ответ на trigger fails  (Roger Mason <rmason@mun.ca>)
Список pgsql-novice
On Saturday, August 28, 2021, Roger Mason <rmason@mun.ca> wrote:

I have tried various modifications of get_final_energy without success.

If get_final_energy() isn’t working as you expect (and its definition is highly suspect so I wouldn’t be surprised) then all of this talk about triggers is just adding unnecessary distraction.  Don’t add triggers to the mix until you know the components are all functioning correctly.

I’d also suggest not doing create table if not exists in a trigger.  Whatever code you use to install the triggers should create the table immediately and then the trigger just assumes it is present.

As for debugging the big query, you just need to learn by doing.  Start writing it again from scratch and when you get to a point where it provide unusual results stop and figure out why.

David J.

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

Предыдущее
От: Roger Mason
Дата:
Сообщение: trigger fails
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: trigger fails