I'm trying to do this:

IF TG_OP = \'INSERT\' OR (TG_OP = \'UPDATE\' AND OLD.status <> NEW.status) THEN

..but pg is complaining:

ERROR:  record "old" is not assigned yet
DETAIL:  The tuple structure of a not-yet-assigned record is indeterminate.
CONTEXT:  PL/pgSQL function "set_dir_count" line 4 at if

Does plpgsql not short circuit its logic?

=>select version();
                                                 version
---------------------------------------------------------------------------------------------------------
PostgreSQL 8.0.8 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
(1 row)

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to