Re: Re: proposal and patch : support INSERT INTO...RETURNING with partitioned table using rule

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: johnlumby <johnlumby(at)hotmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql hackers <pgsql-hackers(at)postgresql(dot)org>, robertmhaas(at)gmail(dot)com
Subject: Re: Re: proposal and patch : support INSERT INTO...RETURNING with partitioned table using rule
Date: 2012-10-23 15:25:40
Message-ID: 20121023152540.GF4971@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

johnlumby escribió:
> On 09/20/12 16:34, Tom Lane wrote:

> >It seems to me that instead of lobbying to throw another kluge on top
> >of that pile, you'd be better off looking for alternative solutions.
> >Have you tried implementing this as an INSTEAD OF trigger, and not using
> >rules at all? That mechanism works just fine with RETURNING, and it
> >seems to me that it would let you do whatever you could do inside a
> >custom function. It would certainly be enough for the
> >dynamic-partition-redirection problem.

> Anyhow, yes, this does indeed serve as a solution to the problem
> without needing any kluges or hacks, so thank you.
> But it gives me (and anyone else who tries it) more work than
> one simple RULE on the table without needing to add the view.
> By the way - what is the reason for the restiction
> that INSTEAD OF triggers cannot be defined on "real" tables,
> only on views? Could this be lifted?

I read this as meaning that this patch is not necessary. You seem to be
saying that you'd like some other things patched in some other ways, but
they are unrelated to the original patch. If you are able to figure out
what you want to change and how, please submit another proposal and patch.

I'm marking this one "rejected" in the current commitfest. Thanks.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2012-10-23 15:35:23 Re: FDW for PostgreSQL
Previous Message Magnus Hagander 2012-10-23 15:08:56 Re: [PATCH] Make pg_basebackup configure and start standby [Review]