Re: On partitioning

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: On partitioning
Date: 2014-12-12 21:28:33
Message-ID: 548B5E01.5060005@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/12/14, 8:03 AM, Robert Haas wrote:
> On Thu, Dec 11, 2014 at 11:43 PM, Amit Langote
> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>> >In case of what we would have called a 'LIST' partition, this could look like
>> >
>> >... FOR VALUES (val1, val2, val3, ...)
>> >
>> >Assuming we only support partition key to contain only one column in such a case.
>> >
>> >In case of what we would have called a 'RANGE' partition, this could look like
>> >
>> >... FOR VALUES (val1min, val2min, ...) TO (val1max, val2max, ...)
>> >
>> >How about BETWEEN ... AND ... ?
> Sure. Mind you, I'm not proposing that the syntax I just mooted is
> actually for the best. What I'm saying is that we need to talk about
> it.

Frankly, if we're going to require users to explicitly define each partition then I think the most appropriate API would be a function. Users will be writing code to create new partitions as needed, and it's generally easier to write code that calls a function as opposed to glomming a text string together and passing that to EXECUTE.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-12-12 21:33:38 Re: Final Patch for GROUPING SETS
Previous Message Jim Nasby 2014-12-12 21:22:10 Re: Commitfest problems