Re: Conditional rule? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Conditional rule?
Date
Msg-id 29738.964797211@sss.pgh.pa.us
Whole thread Raw
In response to Re: Conditional rule?  ("André Næss" <andre.nass@student.uib.no>)
List pgsql-sql
"André Næss" <andre.nass@student.uib.no> writes:
> Secondly, I miss one final idea, when a delete is performed on the
> b_news_unpublished table, I would like to set up a rule or procedure that
> sets the time value to null in b_news for each row that is affected by the
> delete. I understand that the OLD and NEW objects are accessible only during
> UPDATE or INSERT operations, so I can't quite see how to do this...

I might be wrong, but I thought the way it works is:INSERT: "NEW" refers to to-be-inserted rowUPDATE: "OLD" is old row
state,"NEW" is planned new row stateDELETE: "OLD" holds row to be deleted
 
        regards, tom lane


pgsql-sql by date:

Previous
From: "André Næss"
Date:
Subject: Re: Conditional rule?
Next
From: Henry Lafleur
Date:
Subject: RE: RE: Re(2): optimize sql