Ken Winter wrote:
> This rule is supposed to (1) cause an update directed to the view
> "my_data_now" to be made to the underlying table "my_data", (2) reset the
> "effective_date_and_time" of that row to 'now', (3) insert a record
> containing the old values into "my_data", and (4) expire that "old" record
> by setting its "expiration_date_and_time" to 'now'.
I think you want a trigger rather than a rule.
Rules rewrite the query structure, triggers let you deal with values on
a row-by-row basis (for row-level triggers).
--
Richard Huxton
Archonet Ltd