By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,302 Members | 1,200 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,302 IT Pros & Developers. It's quick & easy.

RULE Problem with pseudo relations OLD/NEW

P: n/a

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
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.