From: | Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com> |
---|---|
To: | Beena Emerson <memissemerson(at)gmail(dot)com> |
Cc: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Rahila Syed <rahilasyed90(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Adding support for Default partition in partitioning |
Date: | 2017-06-01 19:35:03 |
Message-ID: | CAOgcT0MkdrXgFbjsZH9vrwxxzMr0Sk7+vsmbgbHA5hMctRGzDw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I have addressed Ashutosh's and Amit's comments in the attached patch.
Please let me know if I have missed anything and any further comments.
PFA.
Regards,
Jeevan Ladhe
On Wed, May 31, 2017 at 9:50 AM, Beena Emerson <memissemerson(at)gmail(dot)com>
wrote:
> On Wed, May 31, 2017 at 8:13 AM, Amit Langote
> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> > On 2017/05/31 9:33, Amit Langote wrote:
> >
> >
> > In get_rule_expr():
> >
> > case PARTITION_STRATEGY_LIST:
> > Assert(spec->listdatums != NIL);
> >
> > + /*
> > + * If the boundspec is of Default partition, it
> does
> > + * not have list of datums, but has only one
> node to
> > + * indicate its a default partition.
> > + */
> > + if (isDefaultPartitionBound(
> > + (Node *)
> linitial(spec->listdatums)))
> > + {
> > + appendStringInfoString(buf, "DEFAULT");
> > + break;
> > + }
> > +
> >
> > How about adding this part before the switch (key->strategy)? That way,
> > we won't have to come back and add this again when we add range default
> > partitions.
>
> I think it is best that we add a bool is_default to PartitionBoundSpec
> and then have a general check for both list and range. Though
> listdatums, upperdatums and lowerdatums are set to default for a
> DEFAULt partition, it does not seem proper that we check listdatums
> for range as well.
>
>
>
>
> --
>
> Beena Emerson
>
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
Attachment | Content-Type | Size |
---|---|---|
default_partition_v18.patch | application/octet-stream | 45.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-06-01 19:47:25 | Re: UPDATE of partition key |
Previous Message | Amit Khandekar | 2017-06-01 18:58:51 | strcmp() tie-breaker for identical ICU-collated strings |