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 1nbOlp-0008Ut-L2 for pgsql-general@arkaria.postgresql.org; Mon, 04 Apr 2022 15:37:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nbOlo-0002ix-Hs for pgsql-general@arkaria.postgresql.org; Mon, 04 Apr 2022 15:37:32 +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 1nbOlm-0002ij-RI for pgsql-general@lists.postgresql.org; Mon, 04 Apr 2022 15:37:32 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nbOlh-0007ZF-VG for pgsql-general@lists.postgresql.org; Mon, 04 Apr 2022 15:37:30 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id B4C0F3201FDD; Mon, 4 Apr 2022 11:37:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 04 Apr 2022 11:37:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=eYQ9h/UYLkAon6 oz6nCj+WwSqIeghj+YOWlctWrKzYA=; b=VQDYKMHfxnm9HGfKA50FUUSmsUBnP+ zfKkzjCij5ikuQSiR8jLEGWBfl8rgG0EHbTIx1gs9kE17WrWNsKeh3ztE6H/ZKs6 WlDVa5vOyk76oswBesDzou3O2fhkfy21bTyY07ZdgQQeKi4WWDvNT7sh/VFyhoQG uBmvf4WOVnry01OxT/cPNQC7wkAUqMLFC0OmE73IZWYKHyce+3x2LG7ZdgxI/uSJ 6T2TBp9WnrF1XCFDQqK1EqmibUzCSfKmcH0zN36nmsTEbFn8SFblal05OMDwPrCZ 6cNRcURW70EhvJm6ZfEWezTy1hVmu1WspZaumBcIPnURRjF/rBD8u/3A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=eYQ9h/UYLkAon6oz6nCj+WwSqIeghj+YOWlctWrKzYA=; b=TJp87bZ7 0q/8Pda2Kz7WSH2bR/CxCcj+Sw9W2vxvV4ihLmeqT1EjG7QdqTzrOqEhloCcmVdZ 9rQrCcqU0kDVjWViopugPKzRtv5nBe4G4YTh0I817pgId3rU+zS0WmHLEjp+KTS7 zy9wBQYuHyCIZsjRTqJymN5J2L8aFDsSeP9Q1psEicrGeSgHB0l7GgW8+0ncG3ju eY7O4BhTDMYi7Pg1L11inDMKyTxYs0UyELYNtpybj2UXKbx6YRby151fTZm+0cKk v9LG+lWqE8PJVJG/De5xO64Kg5X+yqOxkqIfS/MyOgLlptrV0eXBgl5CJvm2zxHT 40L0Hueso8QDbg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudejvddgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeelkeegjefhkeetheefudevteehiedvudehkeduleet fedvffeuhedtvdegtdeffeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhi rghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 4 Apr 2022 11:37:20 -0400 (EDT) Message-ID: <0c02aafa-6079-d6ad-fa1d-a3c36cb8cd19@aklaver.com> Date: Mon, 4 Apr 2022 08:37:19 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: how to find out field size? Content-Language: en-US To: Shaozhong SHI , pgsql-general References: From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/4/22 08:28, Shaozhong SHI wrote: > Postgres documentation says:  maximum field size is 1 GB. > PostgreSQL: Documentation: 12: Appendix K. PostgreSQL Limits > > > So, how to find out the size of column to see how far it from the limit? Documentation also shows: https://www.postgresql.org/docs/current/functions-admin.html pg_column_size ( "any" ) → integer Shows the number of bytes used to store any individual data value. If applied directly to a table column value, this reflects any compression that was done. > > Regards, > > David > -- Adrian Klaver adrian.klaver@aklaver.com