Re: Inheritance

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Inheritance
Дата
Msg-id CAMsr+YGi=rQJ=S5288JYu15UEzsXKOVh=z5JSxKTKPUH8qzAFg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Inheritance  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: Inheritance  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers
On 24 May 2016 at 00:05, Merlin Moncure <mmoncure@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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BTREE_BUILD_STATS build is broken
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: BTREE_BUILD_STATS build is broken