Re: [SQL] the value of OLD on an initial row insert

2013-09-22 Thread Luca Ferrari
On Fri, Sep 20, 2013 at 6:43 PM, James Sharrett wrote: > ERROR: record "old" is not assigned yet > SQL state: 55000 > Detail: The tuple structure of a not-yet-assigned record is indeterminate. > > Is this what's happening? If so, how can I avoid the issue. If I get it right you are running the

[SQL] the value of OLD on an initial row insert

2013-09-20 Thread James Sharrett
I have a number of trigger functions on a table that are performing various calculations. The table is a column-wise orientation with multiple columns that could be updated on a single row. In one of the triggers, I'm performing a calculation but don't want the code to run if the OLD and NEW valu