Re: Needless additional partition check in INSERT? - Mailing list pgsql-hackers

From David Rowley
Subject Re: Needless additional partition check in INSERT?
Date
Msg-id CAKJS1f-7SXmdSgVeZF_f-77ovnRru9hWjdYCBHS-eMW6fGJ-ew@mail.gmail.com
Whole thread Raw
In response to Re: Needless additional partition check in INSERT?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Needless additional partition check in INSERT?
List pgsql-hackers
On 7 June 2018 at 09:08, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> I wonder if we should create a new small function that takes the two
> resultRelInfos and returns the correct boolean --maybe something like
> ExecConstraintsPartConstrNeedsRecheck()-- and then the smarts are in a
> single place and we diminish the risk of a divergence.  It looks like a
> very ad-hoc thing to have a function for, but then the new argument to
> ExecConstraints() *is* pretty ad-hoc already, so encapsulating it seems
> better.

Hi Alvaro,

Thanks for looking at this. I thought it was strange to pass in both
resultRelInfos. I ended up just making the 2nd param a bool to
indicate of tuple routing was used.

I'm personally not really for or against having the function. I agree
that it's slightly weird, but anyway, here's the patch. I'll leave it
up to you to which one you prefer, v3 or v4.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Claudio Freire
Date:
Subject: Re: POC: GROUP BY optimization
Next
From: David Rowley
Date:
Subject: Re: Spilling hashed SetOps and aggregates to disk