Re: order in which rules are executed

From: David Fetter <david(at)fetter(dot)org>
To: Ranjeeth Nagarajan <mnranjeeth(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: order in which rules are executed
Date: 2010-07-28 18:23:36
Message-ID: 20100728182336.GC21214@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jul 28, 2010 at 10:16:45PM +0530, Ranjeeth Nagarajan wrote:
> Hello All,
>
> I have the below query regarding Rules in PostgreSQL:
>
> If I have a table which has multiple rules defined, are the rules
> executed in the order in which they are defined?
>
> Or are they executed in some random order?

They're executed in alphabetical order, to the extent that that is
deterministic, which is not very, and that's not even the wackiest
thing about them. If you have any alternative of any nature, do NOT
use rules.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Otandeka Simon Peter 2010-07-28 18:30:04 Re: How Big is Too Big for Tables?
Previous Message Karsten Hilbert 2010-07-28 18:20:51 Re: Inheritance and trigger/FK propagation