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 1tVPsu-008AqD-Kv for pgsql-general@arkaria.postgresql.org; Wed, 08 Jan 2025 06:49:45 +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 1tVPss-00Dqkq-Ns for pgsql-general@arkaria.postgresql.org; Wed, 08 Jan 2025 06:49:42 +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 1tVPss-00DqjK-Bz for pgsql-general@lists.postgresql.org; Wed, 08 Jan 2025 06:49:42 +0000 Received: from smtp66.iad3b.emailsrvr.com ([146.20.161.66]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tVPsp-000T70-2v for pgsql-general@lists.postgresql.org; Wed, 08 Jan 2025 06:49:41 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp17.relay.iad3b.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 0D9B1A00F9; Wed, 8 Jan 2025 01:49:38 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: Postgres do not support tinyint? From: Christophe Pettus In-Reply-To: Date: Tue, 7 Jan 2025 22:49:08 -0800 Cc: Ron Johnson , "pgsql-generallists.postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: <11AA76D0-CAFE-4A17-BCCF-50520CCDF47F@thebuild.com> References: To: "David G. Johnston" X-Mailer: Apple Mail (2.3776.700.51) X-Classification-ID: c8d380a8-bb5b-4c5a-91cb-efee1809ac16-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Jan 7, 2025, at 22:44, David G. Johnston = wrote: >=20 > You suggest a type with a minimum size of 6 bytes when the complaint = is that the otherwise acceptable 2 byte data type is too large? Although it's not clear from the OP's question, if there are going to be = a significant number of these 3-bit fields, packing them into a = bitstring might be a way forward. It's a good solution for tables with = a ton of booleans.=