Re: Problem with RULE to update tables - Mailing list pgsql-bugs

From Sean Reifschneider
Subject Re: Problem with RULE to update tables
Date
Msg-id 20030318071841.GA23282@tummy.com
Whole thread Raw
In response to Re: Problem with RULE to update tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, Mar 17, 2003 at 02:41:29PM -0500, Tom Lane wrote:
>Yup.  A rule is invoked once per query, not once per operated-on record.
>You'll find that a trigger acts more like what you are expecting.

Ah, yeah, that seems to work exactly as expected.  At least, my tests
now pass successfully after converting from a rule to a trigger.  It was
a pain that trigger functions can't be SQL.  I just wanted to run some
SQL after the delete/insert/update, and ended up having to wrap it in
a pl/python function...

Thanks,
Sean
--
 "Isn't having a smoking section in a restaurant kind of like having a
 peeing section in a swimming pool?"  -- David Broadfoot
Sean Reifschneider, Inimitably Superfluous <jafo@tummy.com>
tummy.com, ltd. - Linux Consulting since 1995.  Qmail, Python, SysAdmin

pgsql-bugs by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Bug #913: plpgsql function fails on second call
Next
From: "Leon Qiu"
Date:
Subject: ERROR: Invalid EUC_CN character sequence found (0x8000)