Search Postgresql Archives

Re: RULE - special variables?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Do rules get special variables like triggers? Can I set 
> variables in them like
> triggers? 

A rule is one or more SQL-Statements - how do you set variables in SQL?

Don't think of a rule as a program!

In a statement in a rule, you have the pseudotables 'OLD' and 'NEW'
which refer to the affected rows of the table on which the rule is
defined, OLD (in DELETE and UPDATE rules) referring to the values before
the triggering statement takes place, and NEW (in INSERT and UPDATE)
referring to the values afterwards.

Yours,
Laurenz Albe


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux