Re: NEW in after insert trugger contained incorrect data

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: NEW in after insert trugger contained incorrect data
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17D9E49D@ntex2010a.host.magwien.gv.at
обсуждение исходный текст
Ответ на NEW in after insert trugger contained incorrect data  (Brilliantov Kirill Vladimirovich <brilliantov@byterg.ru>)
Ответы Re: NEW in after insert trugger contained incorrect data  (Brilliantov Kirill Vladimirovich <brilliantov@byterg.ru>)
Re: NEW in after insert trugger contained incorrect data  (Brilliantov Kirill Vladimirovich <brilliantov@byterg.ru>)
Список pgsql-general
Brilliantov Kirill Vladimirovich wrote:
> I use Postgre-9.3.5 on windows7 x64.
> I use simple trigger for store some statistic data, it code:
> SELECT field IN variable FROM table WHERE ...;
> IF FOUND THEN
>    UPDATE table SET field = ...;
> ELSE
>    INSERT INTO table (field) VALUES(value);
> END IF;
> RETURN NULL;
> 
> This trigger added as FOR EACH ROW on table2.
> In table2 I insert multiple data on one insert, e.g. INSERT INTO
> table2(field) VALUES(value0),(value1),(value2).
> 
> Unfortunately trigger exit with error: ERROR:  record "new" has no field
> "value";

You should post the table definition and the whole trigger; the error
message seems to refer to things you omitted in your quote.

Yours,
Laurenz Albe

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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: Two instances of Postgres with single data directory
Следующее
От: Brilliantov Kirill Vladimirovich
Дата:
Сообщение: Re: NEW in after insert trugger contained incorrect data