Re: trigger fails

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Roger Mason <rmason(at)mun(dot)ca>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: trigger fails
Date: 2021-08-28 14:38:53
Message-ID: CAKFQuwZt-hZj8_p4=hcZ5tWAYw1ZMwkiDiDNTtznmsASYpuZig@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Saturday, August 28, 2021, Roger Mason <rmason(at)mun(dot)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.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message David G. Johnston 2021-08-28 15:50:40 Re: trigger fails
Previous Message Roger Mason 2021-08-28 13:20:35 trigger fails