mikeo <[EMAIL PROTECTED]> 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

Reply via email to