pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: André Næss <andre.nass@student.uib.no>
Cc: pgsql-sql@postgresql.org
Subject: Re: Conditional rule?
Date: Fri, 28 Jul 2000 11:13:31 -0400
Message-ID: <29738.964797211@sss.pgh.pa.us> (raw)
In-Reply-To: <013001bff889$86051030$74b5f8c2@wkst6>
References: <87k8e78yg9.fsf@matt.w80.math-hat.com>
	<003601bff7d9$18cdd610$74b5f8c2@wkst6>
	<00072715035004.09700@comptechnews>
	<00072715082905.09700@comptechnews>
	<013001bff889$86051030$74b5f8c2@wkst6>

"=?iso-8859-1?B?QW5kcukgTuZzcw==?=" <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 row
	UPDATE: "OLD" is old row state, "NEW" is planned new row state
	DELETE: "OLD" holds row to be deleted

			regards, tom lane



view thread (11+ messages)  latest in thread

Message-ID: <29738.964797211@sss.pgh.pa.us>
Permalink:  ../29738.964797211@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29738.964797211@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andre.nass@student.uib.no
  Subject: Re: Conditional rule?
  In-Reply-To: <29738.964797211@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox