Re: Syntax for partitioning

From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Syntax for partitioning
Date: 2009-11-18 04:36:17
Message-ID: 20091118133617.A4A9.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> wrote:

> > * If a table with the same name already exists when a partition
> > is created, the table is re-used as partition. This behavior
> > is required for pg_dump to be simple.
>
> i guess the table must be empty, if not we should be throw an error...
> and i actually prefer some more explicit syntax for this not just
> reusing a table

Yeah, an explicit syntax is better.
I've researched other syntax, but I cannot find any good ones.

* ALTER TABLE child INHERIT parent AS PARTITION
=> implemenation "PARTITION is an INHERIT" is revealed to user.
* ALTER PARTITION child ATTACH TO parent
=> child is not a partition yet at that point.
* ALTER TABLE parent ADD PARTITION child
=> "partition" need to be a full-reserved word.

Are there better idea?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Itagaki Takahiro 2009-11-18 04:52:57 Re: Syntax for partitioning
Previous Message Itagaki Takahiro 2009-11-18 04:35:18 Re: UTF8 with BOM support in psql