Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmyjB-0007hN-Di for pgsql-general@arkaria.postgresql.org; Wed, 09 Dec 2020 12:37:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kmyjA-0001ya-Cd for pgsql-general@arkaria.postgresql.org; Wed, 09 Dec 2020 12:37:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmyjA-0001yT-2p for pgsql-general@lists.postgresql.org; Wed, 09 Dec 2020 12:37:52 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmyj7-0007j4-5D for pgsql-general@lists.postgresql.org; Wed, 09 Dec 2020 12:37:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=4WPJ40LETU3fRsMU1xg5cTAPV0loEouojOIEqsH+7Qg=; b=vHxDnM7w4frb6kQN+YlzX6T2fa iNGLFJSf/UGlOF6I4Am8BJyR/20nHTB2AC3OjilHyavZ2cIZzJJnPJeUhDvVrXNjWbnxMXssfIl3s Hs4apnhx6qw1b/kvnhHZRASQoM9I6OTtMLxT1eGHh03Di0j0lpfQsdRsTjTjKK0JDQX8=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1kmyj5-0006G1-Jk; Wed, 09 Dec 2020 13:37:47 +0100 Date: Wed, 9 Dec 2020 13:37:47 +0100 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Niels Jespersen Cc: "pgsql-general@lists.postgresql.org" Subject: Re: Tools showing table partitions as tables in listings of tables Message-ID: <20201209123747.GA15672@depesz.com> Reply-To: depesz@depesz.com References: <41f3454665a940399ef246aa96ad0380@dst.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <41f3454665a940399ef246aa96ad0380@dst.dk> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Dec 09, 2020 at 12:29:43PM +0000, Niels Jespersen wrote: > A small irritation point is that some tools decide that partitions under a table are to be shown in a list of tables, sometimes > drowning the main table in a sea of partitions. While this doesn't answer your question directly, but when I had this problem, I simply moved partitions to separate schema. So, let's say I have table plans in schema public. All its partitions are in "plans" schema. Of course naming can be done differently, but the thing is that you can do it, and it doesn't cause any issues with queries - as long as you use main table and not directly partitions. Best regards, depesz