Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

RULE Problem with pseudo relations OLD/NEW




I use Postgresql 7.2.1 on Debian Linux 3.0r1.
I have tried to create a RULE exactly as described in the "Postgresql Programmers Manual". Code:


CREATE RULE foo_rule AS ON UPDATE TO foo WHERE  NEW.footxt  != OLD.footxt

      DO UPDATE gaga SET NEW.foodate = CURRENT_TIMESTAMP;


Then I receive the error message:


ERROR:  parser: parse error at or near "NEW"


I tried different ways, but it never created the rule. One time it gave me the error message, that the relation *NEW* doesn't exist...

What's wrong? How can I work with the pseudo relations NEW or OLD, so that postgresql accepts it?


Thanks in advance for any help!


Kurt Gerber


<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.