Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Achilleas Mantzios - cloud <a(dot)mantzios(at)cloud(dot)gatewaynet(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This
Date: 2023-10-23 14:35:43
Message-ID: 374847.1698071743@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Achilleas Mantzios - cloud <a(dot)mantzios(at)cloud(dot)gatewaynet(dot)com> writes:
> someone added this section about inheritance :
> Don't use table inheritance

That's one person's opinion. (Well, they're not alone in it, but
it's just an opinion not a considered community position.)

> I believe this text is false on too many accounts. So, what's the
> consensus about Inheritance in PostgreSQL, I am going to give a talk on
> it in November and I wouldn't like to advertise/promote/teach something
> that the community has decided to abandon or drop.

There's zero chance we'd remove table inheritance. In the first
place, we have too much concern for backwards compatibility, and
in the second place, table partitioning is built on top of it.
Probably no one is going to work hard on adding more features
directly concerned with non-partitioned inheritance, but it's
not going anywhere either.

You should certainly make the point that if your problem looks like
partitioning, you should use partitioning rather than some hand-rolled
use of plain inheritance. But there are valid use-cases where you
actually do want more columns in the child tables than the parent.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2023-10-23 14:40:10 Re: Presentation tools used ?
Previous Message Christophe Pettus 2023-10-23 14:07:19 Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This