Re: [HACKERS] Partitioning WIP patch (was: Partitioning: issues/ideas)

2015-02-25 Thread Jim Nasby
On 2/24/15 2:13 AM, Amit Langote wrote: -- a plain table CREATE TABLE parent_monthly(year int, month int, day int); -- a partitioned table -- x: number of partitions CREATE TABLE parent_monthly_x(LIKE parent_monthly) PARTITION BY RANGE ON(year, month); To be clear, in this example pare

Re: [HACKERS] Partitioning WIP patch (was: Partitioning: issues/ideas)

2015-02-25 Thread Amit Langote
On 24-02-2015 PM 05:13, Amit Langote wrote: > On 21-01-2015 PM 07:26, Amit Langote wrote: >> >> Ok, I will limit myself to focusing on following things at the moment: >> >> * Provide syntax in CREATE TABLE to declare partition key >> * Provide syntax in CREATE TABLE to declare a table as partition

Re: [HACKERS] Partitioning WIP patch (was: Partitioning: issues/ideas)

2015-02-24 Thread Amit Langote
On 25-02-2015 AM 01:13, Corey Huinker wrote: > I think it's confusing to use BETWEEN to mean [low,high) when it already > means [low,high] in WHERE clauses. > Yeah, I'm not really attached to that syntax. > Why not leverage range notation instead? > > CREATE TABLE parent_monthly_x_201401 PA

Re: [HACKERS] Partitioning WIP patch (was: Partitioning: issues/ideas)

2015-02-24 Thread Corey Huinker
I think it's confusing to use BETWEEN to mean [low,high) when it already means [low,high] in WHERE clauses. Why not leverage range notation instead? CREATE TABLE parent_monthly_x_201401 PARTITION OF parent_monthly_x FOR VALUES IN RANGE '[2014-04-01,2014-05-01)' "IN RANGE" could easily be

Re: [HACKERS] Partitioning WIP patch (was: Partitioning: issues/ideas)

2015-02-24 Thread Amit Langote
On 24-02-2015 PM 05:13, Amit Langote wrote: > Additionally, a partition can itself be further partitioned (though I > have not worked on the implementation details of multilevel partitioning > yet): > > CREATE TABLE table_name PARTITION OF parent_name PARTITION BY > {RANGE|LIST} ON(key_columns) FO

Re: [HACKERS] Partitioning WIP patch (was: Partitioning: issues/ideas)

2015-02-24 Thread Amit Langote
On 24-02-2015 PM 05:13, Amit Langote wrote: > -- partitions > CREATE TABLE parent_monthly_x_201401 PARTITION OF > parent_monthly_00100_201401 FOR VALUES BETWEEN (2014, 1) AND (2014, 2); > > CREATE TABLE parent_monthly_x_201402 PARTITION OF > parent_monthly_00100_201402 FOR VALUES BETWEEN (

[HACKERS] Partitioning WIP patch (was: Partitioning: issues/ideas)

2015-02-24 Thread Amit Langote
On 21-01-2015 PM 07:26, Amit Langote wrote: > > Ok, I will limit myself to focusing on following things at the moment: > > * Provide syntax in CREATE TABLE to declare partition key > * Provide syntax in CREATE TABLE to declare a table as partition of a > partitioned table and values it contains > *