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 1tVbn4-009xoj-H6 for pgsql-general@arkaria.postgresql.org; Wed, 08 Jan 2025 19:32:30 +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 1tVbn3-005I5S-Gx for pgsql-general@arkaria.postgresql.org; Wed, 08 Jan 2025 19:32:29 +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 1tVblJ-005Crg-9C for pgsql-general@lists.postgresql.org; Wed, 08 Jan 2025 19:30:40 +0000 Received: from mail-yb1-xb2f.google.com ([2607:f8b0:4864:20::b2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tVblG-000ZSK-2w for pgsql-general@lists.postgresql.org; Wed, 08 Jan 2025 19:30:39 +0000 Received: by mail-yb1-xb2f.google.com with SMTP id 3f1490d57ef6-e39f43344c5so120186276.1 for ; Wed, 08 Jan 2025 11:30:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736364638; x=1736969438; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=yrzXmwBIR+BInKi5a4Tq8vi/tHBt93rf9vklt+K7CuE=; b=PCY7r+71BeukRHfqcysXEutW8wV2ZH0tPykghmMQzK1LrHfNY18eD0DaFTwx9HU8Bf xrgRqUPRm/8UWJBudZNkZr3H3YZSVA6CUhVkbgT4Ufi6T5ewVdxPmEhY7QzzJZNjqGJS 398KzBMKwJWRamtr7cJLhR60yFB+SHHJSEhXKBOSL2YvTe0sUQJOxxqAhnTMVEftI9Zu G1OLrBwfZlzARwDBI27MSQP+b1MSmNnoCRnuMOt2MHx5UKD+21WDm7mukD++rDxyPnUm VunqzAP63J7u6ebV8lFIm6VI8HXCfsYhHQ1Pp8RRpoEveZfX+gcJVKq7COhAEJ4mHD1R oj6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736364638; x=1736969438; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yrzXmwBIR+BInKi5a4Tq8vi/tHBt93rf9vklt+K7CuE=; b=eltIIygqX9h5GJa29068jh5HYaTR50gUyQxvUK84eVsnyzcwVnYQne27Kb9UpVXT5C Lhpx6IQ5d2UBibb9DjyFhyxZYR+OmAEdkXWSCKKJVj9Xx+kYLbZ8cUY4XeeNecAjIAPa 5NFr0K/7C4u5rVnjPWozJw9LQS2h8i22KimDduZ0iKu7Ybb+/pZY3x2kEQ//if9g3PIa lrNzJhv/zt6pgGaHu4thkNpv6opiDbR/kZUCuhs7BuEu/lzJxAYMBp3eO7xDyNOhIwqY w3UR6EQmxOyP/CADlfZIyxNcbKXON4+NtprUDHImCqlObXWiafUySEHjJCI4D4B0iRQH 0W8w== X-Forwarded-Encrypted: i=1; AJvYcCWjVOufNhMg2VS6rBT5T8XLkt42c0boS0p0sTWkJl8+Hwio2zwoQYomrwDXV+R+C4UrSyXAUKJ4cy2JNr5P@lists.postgresql.org X-Gm-Message-State: AOJu0YwcvZO3mG2hAFQaZ/ztX5p1dnaa7q772ftuuzm51v81n3jDRsql Rqqt/4sbS19oic0OFpv3WUU0nCiU0w7XtnxaqQNbjdKvVRrHlBz3GiVguawjCgiuCA5YVjZRwgr BkuwJ1ONEX92PRmmQcFVMg5Fe/n4= X-Gm-Gg: ASbGncsywuZ3YVmVaQXwodkZxFNyuUWeE4Wql4Am/G4hiL5yji90M84L3ElpyIxb6f4 qht4kcYNweDA6QV514ON9bmWaWGdKCZkkVckYkmLh6ao22XneyYU87mwiHNGpM7p4Ev76/PA= X-Google-Smtp-Source: AGHT+IGQ2u9E0DVTMv56dTV06ER/rwwPKbCEGdCoGlfh1fd1LzYi14irNLCgZQcjOizKtp3CyivUZL+O8daj/M5lS9g= X-Received: by 2002:a05:690c:4d07:b0:6ef:5119:6f28 with SMTP id 00721157ae682-6f5311e3612mr36454317b3.8.1736364638225; Wed, 08 Jan 2025 11:30:38 -0800 (PST) MIME-Version: 1.0 References: <11AA76D0-CAFE-4A17-BCCF-50520CCDF47F@thebuild.com> In-Reply-To: <11AA76D0-CAFE-4A17-BCCF-50520CCDF47F@thebuild.com> From: Igor Korot Date: Wed, 8 Jan 2025 13:30:04 -0600 X-Gm-Features: AbW1kvbdmetGJ6bMPBeiXZB-NapVbSplAFhfHC73CZdAspNqY8Boh71JZzr7lLQ Message-ID: Subject: Re: Postgres do not support tinyint? To: Christophe Pettus Cc: "David G. Johnston" , Ron Johnson , "pgsql-generallists.postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, Christophe, On Wed, Jan 8, 2025 at 12:49=E2=80=AFAM Christophe Pettus wrote: > > > > > On Jan 7, 2025, at 22:44, David G. Johnston wrote: > > > > 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 m= ight be a way forward. It's a good solution for tables with a ton of boole= ans. There is no boolean - it is 0-4 inclusive. Also - there are not too many records in that table... Thank you. >