Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-12-06 Thread Amit Langote
On 2017/12/02 2:57, Robert Haas wrote: > On Fri, Dec 1, 2017 at 2:44 AM, Amit Langote > wrote: >> I forgot to consider the fact that mtstate could be NULL in >> ExecSetupPartitionTupleRouting(), so would result in dereferencing NULL >> pointer when called from CopyFrom(), which fixed in the attach

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-12-01 Thread Robert Haas
On Fri, Dec 1, 2017 at 2:44 AM, Amit Langote wrote: > I forgot to consider the fact that mtstate could be NULL in > ExecSetupPartitionTupleRouting(), so would result in dereferencing NULL > pointer when called from CopyFrom(), which fixed in the attached updated > patch. a ? b : false can more si

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-30 Thread Amit Langote
On 2017/12/01 11:01, Amit Langote wrote: > On 2017/12/01 1:02, Robert Haas wrote: >> Second, this would be the first place where the second argument to >> ExecOpenIndices() is passed simply as true. The only other caller >> that doesn't pass constant false is in nodeModifyTable.c and looks >> like

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-30 Thread Amit Langote
On 2017/12/01 11:27, Simon Riggs wrote: > On 24 November 2017 at 13:45, Amit Langote > wrote: > >>> Why? There is no caller that needs information. >> >> It is to be used if and when ExecInsert() calls >> ExecCheckIndexConstraints() in the code path to handle ON CONFLICT DO >> NOTHING that we're

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-30 Thread Simon Riggs
On 24 November 2017 at 13:45, Amit Langote wrote: >> Why? There is no caller that needs information. > > It is to be used if and when ExecInsert() calls > ExecCheckIndexConstraints() in the code path to handle ON CONFLICT DO > NOTHING that we're intending to support in some cases. Note that it w

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-30 Thread Amit Langote
On 2017/12/01 1:02, Robert Haas wrote: > On Wed, Nov 29, 2017 at 11:07 PM, Michael Paquier > wrote: >> On Fri, Nov 24, 2017 at 11:47 AM, Amit Langote >> wrote: >>> On 2017/11/24 11:45, Amit Langote wrote: Meanwhile, rebased patch is attached. >>> >>> Oops, forgot to attach in the last email.

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-30 Thread Robert Haas
On Wed, Nov 29, 2017 at 11:07 PM, Michael Paquier wrote: > On Fri, Nov 24, 2017 at 11:47 AM, Amit Langote > wrote: >> On 2017/11/24 11:45, Amit Langote wrote: >>> Meanwhile, rebased patch is attached. >> >> Oops, forgot to attach in the last email. Attached now. > > Moved to next CF. I have two

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-29 Thread Michael Paquier
On Fri, Nov 24, 2017 at 11:47 AM, Amit Langote wrote: > On 2017/11/24 11:45, Amit Langote wrote: >> Meanwhile, rebased patch is attached. > > Oops, forgot to attach in the last email. Attached now. Moved to next CF. -- Michael

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-23 Thread Amit Langote
On 2017/11/24 11:45, Amit Langote wrote: > Meanwhile, rebased patch is attached. Oops, forgot to attach in the last email. Attached now. Thanks, Amit From ee7ef9d35f810c8c38c0ec40205f7b8c5d1f696d Mon Sep 17 00:00:00 2001 From: amit Date: Mon, 3 Apr 2017 19:13:38 +0900 Subject: [PATCH] Allow ON

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-23 Thread Amit Langote
Thank you Simon for the review. On 2017/11/20 7:33, Simon Riggs wrote: > On 2 August 2017 at 00:56, Amit Langote wrote: > >> The patch's job is simple: > > Patch no longer applies and has some strange behaviours. > >> - Remove the check in the parser that causes an error the moment the >> ON

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-19 Thread Simon Riggs
On 2 August 2017 at 00:56, Amit Langote wrote: > The patch's job is simple: Patch no longer applies and has some strange behaviours. > - Remove the check in the parser that causes an error the moment the > ON CONFLICT clause is found. Where is the check and test that blocks ON CONFLICT UPDAT