Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hudOu-0004iM-Jq for pgsql-general@arkaria.postgresql.org; Mon, 05 Aug 2019 13:51:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hudOt-0004hM-Eh for pgsql-general@arkaria.postgresql.org; Mon, 05 Aug 2019 13:51:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hudOt-0004hF-5P for pgsql-general@lists.postgresql.org; Mon, 05 Aug 2019 13:51:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hudOq-0006Eh-Ix for pgsql-general@postgresql.org; Mon, 05 Aug 2019 13:51:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x75Dpc4f011203; Mon, 5 Aug 2019 09:51:39 -0400 From: Tom Lane To: PegoraroF10 cc: pgsql-general@postgresql.org Subject: Re: why toasted is created when domain is used ? In-reply-to: <1565006878327-0.post@n3.nabble.com> References: <1565006878327-0.post@n3.nabble.com> Comments: In-reply-to PegoraroF10 message dated "Mon, 05 Aug 2019 05:07:58 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11201.1565013098.1@sss.pgh.pa.us> Date: Mon, 05 Aug 2019 09:51:38 -0400 Message-ID: <11202.1565013098@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PegoraroF10 writes: > So, the question is, when I create a table using domains it creates a toast > for it, why ? For me, this doesn't happen for domains over fixed-width types, only variable-width types ... which doesn't seem to match your example. The reason it happens for variable-width cases is that type_maximum_size() only knows about built-in types, so the system can't determine the maximum row width. regards, tom lane