Re: Partitioning syntax - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Partitioning syntax
Date
Msg-id 5768.1279208105@sss.pgh.pa.us
Whole thread Raw
In response to Re: Partitioning syntax  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> Agreed. If all we are doing is adding synonyms for existing feature then
> its not good enough. We need a new syntax that does not need to be
> backwards compatible, allowing various code streamlining and more
> targeting to the desired use case. Inheritance != partitioning. Similar,
> maybe, but not identical. Probably also the only way we can move
> forwards without breaking all the existing user code in subtle ways.

My feeling about it is that partitioning should be a subset of
inheritance --- that is, a partitioned table is an inheritance tree,
but with additional constraints/properties/catalog information.

In the case at hand, that means that you couldn't use ALTER TABLE
INHERIT to install a new partition, but only because it would fail to
provide the additional information needed (partition key info).
ALTER TABLE ATTACH PARTITION is like INHERIT except it also provides
the extra partitioning info.  OTOH, DETACH PARTITION is not really
significantly different from ALTER NO INHERIT --- you could allow them
to be used interchangeably.  Though I'd still favor keeping them
separate just for consistency of the DDL language.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: SHOW TABLES
Next
From: Hans-Jürgen Schönig
Date:
Subject: Re: SHOW TABLES