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

From Alvaro Herrera
Subject Re: Needless additional partition check in INSERT?
Date
Msg-id 20180606210847.qmefnjlqyjlqwvam@alvherre.pgsql
Whole thread Raw
In response to Re: Needless additional partition check in INSERT?  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: Needless additional partition check in INSERT?
List pgsql-hackers
On 2018-May-10, David Rowley wrote:

> Yeah, the comments do need work. In order to make it a bit easier to
> document I changed the way that check_partition_constr is set. This is
> now done with an if/else if/else clause for both COPY and INSERT.
> 
> Hopefully, that's easier to understand and prevents further mistakes.

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.

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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: SCRAM with channel binding downgrade attack
Next
From: Michael Paquier
Date:
Subject: Re: Supporting tls-server-end-point as SCRAM channel binding forOpenSSL 1.0.0 and 1.0.1