INSERT RULE QUERY ORDER - Mailing list pgsql-general

From Justin Tocci
Subject INSERT RULE QUERY ORDER
Date
Msg-id FCC16A7FBE5D074D9E53A8414424E2AC138D11@TLCFWA1NT400
Whole thread Raw
Responses Re: INSERT RULE QUERY ORDER
List pgsql-general
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* and *OLD* being initialized differently for an UPDATE than for an INSERT.
 
I'd like to know what's going on so I can be confident I'm writing my rules correctly.
 
Thanks all.
 
-------------------------------------------
jtocci
Fort Wayne, IN
 
 
 

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Could not receive data from server
Next
From: Tom Lane
Date:
Subject: Re: indices and cidr/inet type