On Aug 2, 2006, at 12:47 , Joe Conway wrote:
regression=# create rule r2 as on update to src do insert into log values(old.*, 'old'), (new.*, 'new'); ERROR: VALUES must not contain OLD or NEW references
Would it make sense to add a HINT as well, recommending the UNION construct Tom mentioned earlier?
On Aug 2, 2006, at 11:52 , Tom Lane wrote:
create rule r2 as on update to src do insert into log select old.*, 'old' union all new.*, 'new'; or just use two separate INSERT commands in the rule.
Or is the general case too, uh, general for a HINT? Michael Glaesemann grzm seespotcode net ---------------------------(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