I might have read that in Bruce's book. Any serious PostgreSQL developer
should read it cover to cover!
I agree, plpgsql should return an error if you try to access NEW when
TG_OP='DELETE'.
Jeffrey
Cedar Cox wrote:
> Bingo! That was it.. Thank you.
>
> BTW, is this behavior documented (no error message)? It should be.
> Even better, make plpgsql a little nicer ;)
>
> -Cedar
>
> On Wed, 7 Mar 2001, Jeffrey Lyon wrote:
>
> > Do you have a trigger applied against this record on DELETE? If so, are
> > you returning NEW or OLD? I think that you need to return NEW on an
> > UPDATE or INSERT and an OLD on DELETE.
> >
> > Jeffrey
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly