Re: Rules not executed on child tables

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: depstein(at)alliedtesting(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org, vshahov(at)alliedtesting(dot)com
Subject: Re: Rules not executed on child tables
Date: 2010-09-17 14:26:53
Message-ID: AANLkTi=Lno4vk0TVqUnacm+dZy9StuxQpp59kXS-8Sx9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Aug 18, 2010 at 5:36 AM, <depstein(at)alliedtesting(dot)com> wrote:
> I noticed that when an action is executed on a parent table, rules for that
> action that are defined on its child tables are ignored.

I think this is actually design behavior. It's really hard to use
rules for anything useful (other than views); you might want to look
at triggers instead. Rules are basically a crude query-rewrite
system. The rule rewriting process doesn't understand anything about
what your query is actually trying to do; it's just analyzing the
syntax (where, of course, the child tables aren't mentioned).

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2010-09-18 00:58:38 Re: BUG #5660: Can't start db service if specify effective_io_concurrency
Previous Message tkbysh2000 2010-09-17 05:10:13 Re: BUG #5661: The character encoding in logfile is confusing.