Re: docs about FKs referencing partitioned tables

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: docs about FKs referencing partitioned tables
Дата
Msg-id 20190523030634.GC5870@paquier.xyz
обсуждение исходный текст
Ответ на Re: docs about FKs referencing partitioned tables  (Paul A Jungwirth <pj@illuminatedcomputing.com>)
Ответы Re: docs about FKs referencing partitioned tables  (Paul A Jungwirth <pj@illuminatedcomputing.com>)
Список pgsql-hackers
On Mon, May 20, 2019 at 10:35:31PM -0700, Paul A Jungwirth wrote:
> I agree that sounds better. To avoid repeating it I changed the second
> instance to just "inherited tables". New patch attached.

Looking closer, you are adding that:
+     <listitem>
+      <para>
+       While primary keys are supported on tables using inheritance
+       for partitioning, foreign keys referencing these tables are not
+       supported.  (Foreign key references from an inherited table to
+       some other table are supported.)
+      </para>
+     </listitem>

However that's just fine:
=# create table aa (a int primary key);
CREATE TABLE
=# create table aa_child (a int primary key, inherits aa, foreign key
(a) references aa);
CREATE TABLE
=# create table aa_grandchild (a int primary key, inherits aa_child,
foreign key (a) references aa_child);
CREATE TABLE

The paragraph you are removing from 5.11.2.3 (limitations of
declarative partitioning) only applies to partitioned tables, not to
plain tables.  And there is no such thing for paritioning based on
inheritance, so we should just remove one paragraph, and not add the
extra one, no?
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Minor typos and copyright year slippage
Следующее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: PostgreSQL 12 Beta 1 press release draft