From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Declarative partitioning |
Date: | 2015-08-24 07:46:59 |
Message-ID: | CANP8+jK4CFwPCjFRYNnOeGrga1pZF6Wd+HZ0oe7Zz58ZrTTWKQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 24 August 2015 at 00:53, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> On 08/21/2015 08:34 PM, Jim Nasby wrote:
> > On 8/18/15 12:31 PM, Josh Berkus wrote:
> >> Also this would be useful for range
> >> partitions:
> >>
> >> CREATE PARTITION ON parent_table USING ( start_value );
> >>
> >> ... where start_value is the start range of the new partition. Again,
> >> easier for users to get correct.
> >
> > Instead of that, I think it would be more foolproof to do
> >
> > CREATE PARTITION ON parent_table FOR ( value1, ... );
> >
> > instead of trusting the user to get the exact start value correct.
> >
> > Though... I guess there could be value in allowing an exact start value
> > but throwing an error if it doesn't sit exactly on a boundary. Might
> > make it less likely to accidentally create the wrong partition.
>
> Well, I'm figuring that most people would use "CREATE NEXT PARTITION"
> instead.
>
ALTER TABLE foo ADD PARTITION NEXT;
when a sequence of partitions has been defined
--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2015-08-24 10:49:41 | Re: psql - better support pipe line |
Previous Message | Fabien COELHO | 2015-08-24 07:15:44 | Re: checkpointer continuous flushing |