On 24 May 2016 at 00:05, Merlin Moncure <mmonc...@gmail.com> wrote:

>
> This feature was very much a product of the time, at the height of the
> "Object Relational" fad.  The trend for postgres has been in the exact
> opposite direction, towards the SQL standard.  Further complicating
> matters, inheritance has been repurposed to be the foundation for
> table partitioning, making heavy changes problematic.
>

Indeed.

I find it notable that no popular ORM has bothered adopting PostgreSQL's
inheritance features, and instead just use big left joins or repeated
SELECTs to implement parent/child relationships, with foreign keys
enforcing constraints.

I consider inheritance mostly useless without the ability to have UNIQUE
indexes that span a parent relation and all its children. You can use them
for partitioning only by sacrificing a bunch of integrity protection or
creating messy chains of FKs between individual partitions.

I'd rather like to quietly deprecate inheritance and eventually remove it
once we have real partitioning and some time has passed...

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Reply via email to