Re: NEW in after insert trugger contained incorrect data

From: Brilliantov Kirill Vladimirovich <brilliantov(at)byterg(dot)ru>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: NEW in after insert trugger contained incorrect data
Date: 2014-11-14 15:23:56
Message-ID: 54661E8C.1080207@byterg.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver wrote on 11/14/2014 05:15 PM:
>
> Actually I think there is in the table the trigger is on. From the
> original post:
>
> SQL statement "INSERT INTO trassa.cpu_load (device, device_timestamp,
> cpu, value) VALUES(5,'1970-01-02 06:02:38',0,6),(5,'1970-01-02
> 06:02:38',1,0),(5,'1970-01-02 06:02:38',255,3)"
>
> though what is showing up in the error is this:
>
>
> NOTICE: *** START ***: (9994,5,"2014-11-14 13:38:04.94","1970-01-02
> 06:02:38",0 ,6)

You can see what original data contained timestamp 1970-01-02 06:02:38,
value 0 and 6, trigger start message also contain this values.
Base on this I think trigger start message is correct and I get it after
first insert, where 9994 is a inserted id.
>
> Not sure where the 9994, and "2014-11-14 13:38:04.94" are coming from,
> though I think it is related to this from the error message:
>
> PL/pgSQL function
> update_cpu_load_list(integer,integer,smallint[],smallint[]) line 19 at
> EXECUTE statement
>
> I am pretty sure the error is coming from a different function then the
> one we are being shown. So we would need to see the table the trigger is
> being run on as well as any other triggers and associated functions.
>
>>
>> Yours,
>> Laurenz Albe
>>
>
>

--
С уважением,
Бриллиантов Кирилл Владимирович
…………………………………………………………………
программист, технический отдел
ООО «БайтЭрг»
Видеокамеры МВК – Эффективность разумных решений
…………………………………………………………………
+7(495)221-66-22
http://www.byterg.ru http://www.bestdvr.ru

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-11-14 15:27:40 Re: NEW in after insert trugger contained incorrect data
Previous Message Andy Colson 2014-11-14 14:55:24 Re: service allowing arbitrary relations was Re: hstore, but with fast range comparisons?