Re: Partitioning syntax - Mailing list pgsql-hackers

From Takahiro Itagaki
Subject Re: Partitioning syntax
Date
Msg-id 20100707151450.9805.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: Partitioning syntax  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Partitioning syntax
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> wrote:

> I've taken a little bit more of a look at this patch and I guess I'm
> not too happy with the design.

Thanks. I was thinking about only syntax for partitioning in the patch,
but I need more consideration about insert-aware catalog design.

> 5. The use of the term "partition" is not very consistent.  For
> example, we use CREATE PARTITION to create a partition, but we use
> DROP TABLE to get rid of it (there is no DROP PARTITION).  I think
> that the right syntax to use here is ALTER TABLE ... ADD/DROP
> PARTITION; both Oracle and MySQL do it that way. And meanwhile
> OCLASS_PARTITION means "the partitioning information associated with
> the parent table", not "a partition of a parent table".

"ALTER TABLE ... ADD/DROP PARTITION" was discussed many times,
but I cannot solve syntax confict with "ALTER TABLE ... ADD [COLUMN]".
Since we can omit COLUMN, parser treats "ADD PARTITION" as adding
a column named "PARTITION". We need to add PARTITION into the reserved
keyword list to avoid shift/reduce errors.

Do you have any better idea?

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: [COMMITTERS] pgsql: Add note that using PL/Python 2and 3 in the same session will
Next
From: Gourish Singbal
Date:
Subject: Invitation to connect on LinkedIn