Re: Deprecating RULES

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Daniel Farina <daniel(at)heroku(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Deprecating RULES
Date: 2012-10-22 13:36:46
Message-ID: CA+TgmoYL-m5QaUE9uC-m3_t3R0qkhLzd7Jwq=zKkexNF5Y2JBg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 22, 2012 at 8:57 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> The problems with MERGE are mostly around concurrency, as far as I can
>> tell. I can't see why RULEs would have anything to do with it -
>> except that I don't see how MERGE can sanely support rules, and even
>> if we find a way to make it do that, anyone already using RULEs will
>> need to adjust them to support MERGE. I'm not sure I have a horribly
>> well-thought-out position on the underlying issue here - I'm kind of
>> vacillating back and forth - but I do think one of the problems with
>> RULEs is that they are too tied to particular command names. Adding
>> any new commands that can select or modify data - be it MERGE, UPSERT,
>> or whatever - is going to cause trouble both for implementors and for
>> people relying on the feature.
>
> And triggers (or anything else) would be better on that score because ...?

Well, my thought was that a trigger - at least a row-level trigger -
can presumably be fired on the basis of whether an individual row is
being insert or updated, rather than on whether the statement is named
INSERT or UPDATE. If that's not correct, we've got some
head-scratching to do...

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2012-10-22 14:17:01 Re: [PATCH 8/8] Introduce wal decoding via catalog timetravel
Previous Message Robert Haas 2012-10-22 13:33:58 Re: [v9.3] Row-Level Security