From: | Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | amul sul <sulamul(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: With commit 4e5fe9ad19, range partition missing handling for the NULL partition key |
Date: | 2017-11-23 10:41:59 |
Message-ID: | CAGPqQf3xWKp4vdERhHGpVb81_BDZyXJYJVmQBMJTJenAhu3ouA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Nov 22, 2017 at 2:36 PM, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp
> wrote:
> On 2017/11/22 17:42, amul sul wrote:
> > On Wed, Nov 22, 2017 at 11:38 AM, Amit Langote wrote:
> >> On 2017/11/22 13:45, Rushabh Lathia wrote:
> >>> Attaching patch to fix as well as regression test.
> >>
> >> Thanks for the patch. About the code, how about do it like the attached
> >> instead?
> >>
> >
> > Looks good to me, even we can skip the following change in v2 patch:
> >
> > 19 @@ -2560,6 +2559,8 @@ get_partition_for_tuple(Relation relation,
> > Datum *values, bool *isnull)
> > 20 */
> > 21 part_index =
> > partdesc->boundinfo->indexes[bound_offset + 1];
> > 22 }
> > 23 + else
> > 24 + part_index = partdesc->boundinfo->default_index;
> > 25 }
> > 26 break;
> > 27
> >
> > default_index will get assign by following code in
> get_partition_for_tuple() :
> >
> > /*
> > * part_index < 0 means we failed to find a partition of this parent.
> > * Use the default partition, if there is one.
> > */
> > if (part_index < 0)
> > part_index = partdesc->boundinfo->default_index;
>
> Good point. Updated patch attached.
>
Thanks Amit.
Patch looks good to me.
--
Rushabh Lathia
www.EnterpriseDB.com
From | Date | Subject | |
---|---|---|---|
Next Message | REIX, Tony | 2017-11-23 10:57:27 | PostgreSLQ v10.1 and xlC compiler on AIX |
Previous Message | Rui Hai Jiang | 2017-11-23 10:38:59 | How is the PostgreSQL debuginfo file generated |