Re: Deprecating RULES

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: 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-19 21:03:56
Message-ID: 5081C03C.40102@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-10-19 21:08:18 Re: [PATCH] Support for Array ELEMENT Foreign Keys
Previous Message Andres Freund 2012-10-19 20:56:22 Re: [PATCH] Support for Array ELEMENT Foreign Keys