Sven Willenberger wrote:
On Thu, 2005-10-20 at 15:01 +0100, Richard Huxton wrote:
However, in this particular case I think you want an after insert trigger on customer rather than a rule.

As as AFTER INSERT trigger, I can safely assume here that NEW.custid wil
now properly use the actual value of the custid rather than nextval()? I
have dropped the rule and created the AFTER INSERT trigger so I guess I
will find out shortly enough :-)

An AFTER TRIGGER does nothing to the plan-tree, it just calls a function once per row (for a per-row trigger). You have two structures (NEW,OLD) with ordinary values in them.

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to