Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1quw29-002CFj-SM for pgsql-general@arkaria.postgresql.org; Mon, 23 Oct 2023 14:35:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1quw27-00ACeu-6z for pgsql-general@arkaria.postgresql.org; Mon, 23 Oct 2023 14:35:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1quw26-00ACel-S9 for pgsql-general@lists.postgresql.org; Mon, 23 Oct 2023 14:35:55 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1quw20-001v21-Sl for pgsql-general@lists.postgresql.org; Mon, 23 Oct 2023 14:35:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 39NEZhpI374848; Mon, 23 Oct 2023 10:35:43 -0400 From: Tom Lane To: Achilleas Mantzios - cloud cc: pgsql-general@lists.postgresql.org Subject: Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This In-reply-to: <2f106761-daa8-6b26-013e-884da25322c2@cloud.gatewaynet.com> References: <2f106761-daa8-6b26-013e-884da25322c2@cloud.gatewaynet.com> Comments: In-reply-to Achilleas Mantzios - cloud message dated "Mon, 23 Oct 2023 14:45:22 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <374846.1698071743.1@sss.pgh.pa.us> Date: Mon, 23 Oct 2023 10:35:43 -0400 Message-ID: <374847.1698071743@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Achilleas Mantzios - cloud 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