Re: [GENERAL] INSERT RULE QUERY ORDER

2003-08-14 Thread Tom Lane
Justin Tocci <[EMAIL PROTECTED]> writes: > Thanks for the reply Tom, here's the rule that works: > CREATE RULE tquotehistory_update AS ON UPDATE TO vtquotehistory DO INSTEAD > ( > INSERT INTO tquotehistory_log ("ID", "Item", "Quote1", "DemandCost1", > "Quote2", "DemandCost2", "DueDate", "POIntoI

[GENERAL] INSERT RULE QUERY ORDER

2003-08-09 Thread Justin Tocci
When my RULE takes the form of:   CREATE RULE name AS ON INSERT TO table DO INSTEAD ( UPDATE query ; INSERT query) ;   The INSERT query doesn't fire and there is no error. Putting the INSERT first allows them to both fire. Can anyone tell me why? I think it has something to do with *NEW* an

Re: [GENERAL] INSERT RULE QUERY ORDER

2003-08-06 Thread Justin Tocci
You are correct Tom, vtquotehistory is a view of tquotehistory, and I am trying to log in this example. Sorry I didn't point that out. The view is a straight view with no WHERE clause or criteria of any kind. The UPDATE does cause the OLD record to become updated to whatever changes have been set a