pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Aasmund Midttun Godal <postgresql@envisity.com>
To: tgl@sss.pgh.pa.us
Cc: pgsql-hackers@postgresql.org
Cc: joel@joelburton.com
Cc: pgsql-sql@postgresql.org
Subject: Re: CREATE RULE ON UPDATE/DELETE
Date: Sun, 21 Oct 2001 22:26:03 GMT
Message-ID: <20011021222603.10841.qmail@ns.krot.org> (raw)
In-Reply-To: <28356.1003682861@sss.pgh.pa.us>
References: <Pine.LNX.4.30.0110202326080.6433-100000@temp.joelburton.com>
	<28356.1003682861@sss.pgh.pa.us>

Yes, I agree perfectly... I never thought of that! I would really like it if some more info was added to the docs regarding info on rules and triggers. The section on update rules is quite good, but some more would never hurt. One point in the trigger vs rules section which at least to me is very important is the simple fact that you cannot have a trigger on a select... Ok I understand why - but it took some time...

Thank you for answering my questions!

regards,

Aasmund.
On Sun, 21 Oct 2001 12:47:41 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Joel Burton <joel@joelburton.com> writes:
> 
> 
> Surely you'd need something like
> 
> CREATE RULE dbl_update AS ON UPDATE TO dbl DO INSTEAD UPDATE raw SET
> id = NEW.id / 2, name = NEW.name WHERE OLD.id = id * 2;
> 
> (untested...)
> 
> 			regards, tom lane

Aasmund Midttun Godal

aasmund@godal.com - http://www.godal.com/
+47 40 45 20 46



view thread (7+ messages)  latest in thread

Message-ID: <20011021222603.10841.qmail@ns.krot.org>
Permalink:  ../20011021222603.10841.qmail@ns.krot.org/
Also on:    postgresql.org/message-id/20011021222603.10841.qmail@ns.krot.org

 · 

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: postgresql@envisity.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org, joel@joelburton.com
  Subject: Re: CREATE RULE ON UPDATE/DELETE
  In-Reply-To: <20011021222603.10841.qmail@ns.krot.org>

* 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