'record old is unassigned yet' when using trigger in 7.1.1

Поиск
Список
Период
Сортировка
От Joseph Shraibman
Тема 'record old is unassigned yet' when using trigger in 7.1.1
Дата
Msg-id 3AF9AECE.DE93E098@selectacast.net
обсуждение исходный текст
Список pgsql-sql
I have a function used in a trigger that looks like this:
      begin      IF OLD.status <> NEW.status     THEN    NEW.statchangedate = CURRENT_DATE;     END IF;return NEW;end;

The problem is when a new row is inserted I get this error message:
ERROR:  record old is unassigned yet
... and the insert fails.

It doesn't matter if the trigger is before or after.

-- 
Joseph Shraibman
jks@selectacast.net
Increase signal to noise ratio.  http://www.targabot.com


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