Search Postgresql Archives

Re: What about improving the rules system we have, was Re: Rules going away

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 28, 2011 at 11:46 AM, Harald Fuchs <hari.fuchs@xxxxxxxxx> wrote:
> In article <4116.1317226367@xxxxxxxxxxxxx>,
> Tom Lane <tgl@xxxxxxxxxxxxx> writes:
>
>> Not sure this specific proposal makes any sense at all.  IMO the only
>> real advantage that rules have over triggers is that they work on a
>> set-operation basis not a tuple-by-tuple basis.
>
> Isn't that what statement-level triggers are for, at least in other DB
> systems?  How about telling PostgreSQL's statement-level triggers
> something about the set of rows they affect?

in theory that would be nice, but they just don't work that way.  you
don't even have access to the SQL statement firing the trigger IIRC.
that said, with some thought you could work an 'after' trigger into a
set level operation, say, by rigging something around now().

now that we have view triggers (not that rules ever really worked for
updating views anyways), even notwithstanding the minor limitations of
triggers of rules vs triggers, I personally find the RULE feature to
be useless and dangerous.  I'd vote for immediately deprecating it
without hesitation.

merlin

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux