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

From: Joseph Shraibman <jks(at)selectacast(dot)net>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: 'record old is unassigned yet' when using trigger in 7.1.1
Date: 2001-05-09 20:55:42
Message-ID: 3AF9AECE.DE93E098@selectacast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)selectacast(dot)net
Increase signal to noise ratio. http://www.targabot.com

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Joe Conway 2001-05-09 21:55:48 Re: 'record old is unassigned yet' when using trigger in 7.1.1
Previous Message Issurdatt, Portia CECOM RDEC STCD SRC 2001-05-09 18:38:14 Information passing, Perl, Unix and Postgresql Database