Re: Deprecating RULES - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: Deprecating RULES
Date
Msg-id 5081C03C.40102@agliodbs.com
Whole thread Raw
In response to Re: Deprecating RULES  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Deprecating RULES  (Peter Geoghegan <peter@2ndquadrant.com>)
Re: Deprecating RULES  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
> That's a pretty neat one-liner.  However... in my view, the real cost
> of rules is that they are hard to support as we add new features to
> SQL.  I believe we already decided to punt on making them work with
> CTEs... and maybe one other case?  I don't really remember the details
> any more, but presumably this will come up again with MERGE, and
> perhaps other cases...

Unless the easiest way to implement MERGE is to extend RULEs.

Actually, I found myself wondering about RULEs and FDWs, for that
matter.  There's not much synergy there now, but I can imagine RULEs
being used to do rewriting for funkier FDW setups, which would be hard
to do with TRIGGERs.

For example, imagine you have a series of CSV FDWs which relate to
segments of a postgres log.  You want to query them like they were one
table.  How would you use triggers to do that?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [PATCH] Support for Array ELEMENT Foreign Keys
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Support for Array ELEMENT Foreign Keys