Re: Needless additional partition check in INSERT?

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>
Subject: Re: Needless additional partition check in INSERT?
Date: 2018-06-07 04:10:39
Message-ID: CAKJS1f_XxaAUQVgxGZOtyBs1Tk6H_SL9J6YLTyhkOnds3sZmXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7 June 2018 at 16:05, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> Or we could just not have a separate function and put the logic that
> determines whether or not to check the partition constraint right before
> the following piece of code in ExecConstraints
>
> if (check_partition_constraint && resultRelInfo->ri_PartitionCheck &&
> !ExecPartitionCheck(resultRelInfo, slot, estate))
> ExecPartitionCheckEmitError(resultRelInfo, slot, estate);

I don't think so. The function Alvaro is talking about is specific to
inserting a tuple into a table. The place you're proposing to put the
call to it is not.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-06-07 04:13:10 Re: Needless additional partition check in INSERT?
Previous Message Amit Langote 2018-06-07 04:05:22 Re: Needless additional partition check in INSERT?