Re: Auto creation of Partitions

From: Jim Nasby <decibel(at)decibel(dot)org>
To: NikhilS <nikkhils(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Auto creation of Partitions
Date: 2007-03-08 04:17:38
Message-ID: 65391829-366B-4A65-9E54-903D7C7195A9@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Mar 6, 2007, at 4:57 AM, NikhilS wrote:
> iv) Based on the PRIMARY, UNIQUE, REFERENCES information specified,
> pass it on to the children tables.

Since we want to eventually support 'global' indexes, I think we need
to be really careful here. There's actually 3 possible cases:

1) Index* should be global (spanning multiple tables)
2) Index* should be inherited by all partitions as they're created
3) Index* should exist only on the parent table

* Note that there's really no reason this has to be limit to indexes;
it could certainly apply to constraints, or even triggers.

IIRC, Oracle has a special syntax for global indexes; any other index
defined on a partitioned table is picked up *by newly created
partitions*. If you want to add indexes to existing partitions, you
have to explicitly add it to each partition.

I'd like to eventually see us supporting all 3 options. I'm not sure
how much we want to clutter the grammar, though.
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2007-03-08 04:27:03 Re: Auto creation of Partitions
Previous Message Jim Nasby 2007-03-08 04:07:42 Re: Auto creation of Partitions

Browse pgsql-patches by date

  From Date Subject
Next Message Jim Nasby 2007-03-08 04:27:03 Re: Auto creation of Partitions
Previous Message Jim Nasby 2007-03-08 04:07:42 Re: Auto creation of Partitions