Re: UPDATE SET (a,b,c) = (SELECT ...) versus rules

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: UPDATE SET (a,b,c) = (SELECT ...) versus rules
Date: 2014-06-17 14:31:00
Message-ID: CAHyXU0y+_aKRNK066k9UU+M+XC_dS3YKD66V+qfnL0xVjgCvuQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 17, 2014 at 9:02 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> But come to think of it, WITH is already an interesting precedent: if you
> look into rewriteHandler.c you'll notice a boatload of corner cases where
> the rewriter just throws up its hands for various combinations of rules
> and statements containing WITH. So maybe that lends a bit more weight
> to Andres' position that it's okay to consider this an unimplemented
> feature.

This reflects previous consensus AIUI. RULES came up in similar way
with the 'data modifying with' feature; it was decided that as long as
old stuff didn't break new features don't necessarily have to go
through the motions. This essentially deprecates rules IMO, which is
fine. Maybe a small adjustment of the note in the rule documentation
couldn't hurt; it currently warns based on performance...a heads up
that current and future SQL features might not be fully supported
would be nice.

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-06-17 14:31:45 Re: Minmax indexes
Previous Message MauMau 2014-06-17 14:26:37 [patch] pg_copy - a command for reliable WAL archiving