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 1tVPX3-00870S-Be for pgsql-general@arkaria.postgresql.org; Wed, 08 Jan 2025 06:27:09 +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 1tVPX2-00DXnz-Oz for pgsql-general@arkaria.postgresql.org; Wed, 08 Jan 2025 06:27:08 +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 1tVPX2-00DXnr-DZ for pgsql-general@lists.postgresql.org; Wed, 08 Jan 2025 06:27:08 +0000 Received: from mail-yb1-xb35.google.com ([2607:f8b0:4864:20::b35]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tVPX0-000Snf-09 for pgsql-general@lists.postgresql.org; Wed, 08 Jan 2025 06:27:07 +0000 Received: by mail-yb1-xb35.google.com with SMTP id 3f1490d57ef6-e54d268bc3dso3407455276.1 for ; Tue, 07 Jan 2025 22:27:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736317625; x=1736922425; darn=lists.postgresql.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VT7HQY+U1gWk4BI0LIm/fWHri7azcjJspXVaR0B+V+U=; b=dec+e09xiaKgAon/iwCTPHx2CPHc/zigWCim+UcCMGTwjygeCcLnMQ+Q0nn7iyUWJo OGr40DLN5zyJN9HysqDDwA2L0Rn8viZ3UiARjZ/ltQIhQZNgpDQ23VPgvMYrvqz06GHd yIV8FR3luLsPAApZ3UdZ8lnVsmCYDDuYzc3lgCVD+fR0uA7d3U6vtzVowqupIrXL3FNY DQFW+y5ZJutX31a79cTZ8QMhu5UKdq3LZ8U9kmFUIIktBngIORx3QUnx6xZ9t/Fwouuz xYHBDyT4su24YfbRLVIAe1oL8nQdUCAc/nGuiV+FZl4K+Sm8DVej1pjC6hXEs0OrUDGe ps5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736317625; x=1736922425; h=content-transfer-encoding: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=VT7HQY+U1gWk4BI0LIm/fWHri7azcjJspXVaR0B+V+U=; b=n3oGPru2u06mbCubvGVwJd1eAQjKeS7Qc0KMTqC90T3cph5x8p0WIBcvb24oAgvvZY ShTMatvOijxjnBml3jLHW3RyL3HQ2r9wJXF19zvK2ZtdshzBJu6Rlps6VtBuA7AahAAR dws4lZj58WR03EgqpH2rK3AnYr65Rm7hPUmfTJ6JUXm6qOCpSYTE2VFNMbjd7xihrOuN lLEqny8RKaTFZd7H9gvsKAJO/SrqnXCGif1oLTQoeemm/gs/fPrXJOC6AT+VjBNcyIjp AkC6aAM/N3SWpUFzOcFf9EiMwvCa1CU84b308IUBeLEdslOL/LL7EexxrOFdoJIv3hia Lg7g== X-Forwarded-Encrypted: i=1; AJvYcCUpwYolIc3iGfr4qTdRPkMclhJV7LcfAu1Zx69EXBcypVLJydEIBux681c4Ogj6PhyyHsWa4zxJXLiPk2mb@lists.postgresql.org X-Gm-Message-State: AOJu0YxtdYaBUsh8N8TwerFOcyVvgB7f3IpCHCWDXarvf8+3NBkCBy6n y/STQJJc9p880hDIfdkwCIojyXTKMwAsmSEmGwfESXwXi9QFkZVSvV1OkWhbKg6VFHdaB+gwciA 9IsbFDABE8meqL31FIVk0KdLmdnM= X-Gm-Gg: ASbGncvzh5bfxWJDXpoLmrye6b6iVM61Y3fEYr0FRGUnDELibB3uhVU9FUh1zGTmBMo 3RKbRe+yfGsxRpV1T276/qKwoHNMHspF2Q1IE8N2MF05h7CoXL7Tdh3nJr6NpEsv5prkKuCY= X-Google-Smtp-Source: AGHT+IGLp7zEopCRoqFxvxsU+dP0hAaxd0COLRPQq6TzS0bGyTtXCINMMrK52QCPe6KU+kq5mdA7b9Dc6hRBqNEVGuo= X-Received: by 2002:a05:690c:7481:b0:6ef:805c:ea0d with SMTP id 00721157ae682-6f531227526mr14175117b3.16.1736317625635; Tue, 07 Jan 2025 22:27:05 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Igor Korot Date: Wed, 8 Jan 2025 00:26:32 -0600 X-Gm-Features: AbW1kvaDMPNoxLL9RMmUUFo_u0PokM1cOd5-h9ZjsmT470TdH4gmiBlBHebEMC0 Message-ID: Subject: Re: Postgres do not support tinyint? To: 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, Ron, On Tue, Jan 7, 2025 at 11:24=E2=80=AFPM Ron Johnson wrote: > > On Wed, Jan 8, 2025 at 12:06=E2=80=AFAM Igor Korot w= rote: >> >> Hi, ALL, >> According to https://www.postgresql.org/docs/9.1/datatype-numeric.html, = the >> smallest numeric type supports numbers from -32768 to 32767/ >> >> My data will be in a range of [0..4], and so I guess my DB table will wa= ste >> space, right? > > > 1. It's not 1994 anymore, when 8M rows was enormous. > 2. Record structures are padded by word size, so tinyint wouldn't matter = unless you specifically ordered the fixed width columns from largest to sma= llest size when creating the table. > 3. The "bit" type might serve your needs. I don't see the "bit" field here: https://www.postgresql.org/docs/current/datatype-numeric.html... Thank you.. > > -- > Death to , and butter sauce. > Don't boil me, I'm still alive. > lobster!