Re: trigger question
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: mikeo <mikeo@spectrumtelecorp.com>
Cc: pgsql-general@postgresql.org
Date: 2000-06-27T14:33:10Z
Lists: pgsql-general
mikeo <mikeo@spectrumtelecorp.com> writes:
> CREATE function rates_hist_function()
> returns opaque
> as 'BEGIN
> if ( old.rt_valid <> ''P'' or new.rt_valid not in (''Y'',''N''))
^^^^^^^^^^^^
> i get this error:
> ERROR: record old is unassigned yet
> since this trigger is for both insert or update, why does it expect
> the "OLD" value to already exist, as it would not for insert?
Because you referenced it in the function code. Am I missing something?
regards, tom lane