Re: NEW in after insert trugger contained incorrect data
От | Adrian Klaver |
---|---|
Тема | Re: NEW in after insert trugger contained incorrect data |
Дата | |
Msg-id | 54661F6C.4050100@aklaver.com обсуждение исходный текст |
Ответ на | Re: NEW in after insert trugger contained incorrect data (Brilliantov Kirill Vladimirovich <brilliantov@byterg.ru>) |
Список | pgsql-general |
On 11/14/2014 07:23 AM, Brilliantov Kirill Vladimirovich wrote: > 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. But the error message is coming from this: PL/pgSQL function update_cpu_load_list(integer,integer,smallint[],smallint[]) line 19 at EXECUTE statement Note different function name and the EXECUTE statement. There is no EXECUTE in the function you showed us. >> >> 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 >>> >> >> > > -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: