Re: Odd plpgsql behaviour - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Odd plpgsql behaviour
Date
Msg-id 7985.1100532586@sss.pgh.pa.us
Whole thread Raw
In response to Re: Odd plpgsql behaviour  (Mike Rylander <mrylander@gmail.com>)
List pgsql-hackers
Mike Rylander <mrylander@gmail.com> writes:
> IIRC, the reason for this is that the entire IF test is passed to the
> SQL engine as a SELECT statement after replacing the TG_* identifiers
> with their respective values.
> In this case, since OLD.name does not exist during INSERT it cannot be
> replaced.  Perhaps someone else can shed a little more light on this.

Nope, that's about all there is to say about it ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: GiST: PickSplit and multi-attr indexes
Next
From: Tom Lane
Date:
Subject: Re: psql \e broken again