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 1tWBWB-00Enzl-2x for pgsql-general@arkaria.postgresql.org; Fri, 10 Jan 2025 09:41:27 +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 1tWBWA-00E8cz-JL for pgsql-general@arkaria.postgresql.org; Fri, 10 Jan 2025 09:41:26 +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 1tWBWA-00E8cr-8r for pgsql-general@lists.postgresql.org; Fri, 10 Jan 2025 09:41:25 +0000 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tWBW7-000r84-2q for pgsql-general@lists.postgresql.org; Fri, 10 Jan 2025 09:41:25 +0000 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-2a8690dcb35so586239fac.3 for ; Fri, 10 Jan 2025 01:41:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736502083; x=1737106883; 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=Y4i3EI8baysYG4mqK/OhD96t/hhWGwwjFDJWTek7Re8=; b=VXXT7b7P2kxK41GTOiSZF/bdoaeiCN4tYYdJAI6BqQYLH14EDNmldcC7Z/4JMVGJQw NnItVwSmfbqaoCWEEv/rMwqNenf/MrlClRos9m5s7FjxDXv4Cy8hlwoGelPDoDHEw6yE CQdz7DpcKsPrev1iMKYAoWShYOdZJB9O8HhkA9cTBzolpAsF69IWAGR8fbySj8Crtj2Z a4WZ5ay1ieMYJjsqluNWFmP9EeS+4wEnLYzPR7en4RCMMe2MURvd1BX+wm2Srv/XLaVx H9juqmphh3OFsY+wtJIhrE2gJtZEccI0aIlf7Erje4a03ndgXzDL1U5P/08fHZnVmlpX HKug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736502083; x=1737106883; 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=Y4i3EI8baysYG4mqK/OhD96t/hhWGwwjFDJWTek7Re8=; b=DfxCDGUhycsnjqr8fmDiIv0X4UXVmXzTDGEtBX59TDJaN7BchUPn9IU/xFMrinRSmi r5Kd4xWDHxSA8SdYSmf22+xMznl30tPBQ8YvLrM2IS84sY1XGEGPrCGfd9EnMrTpCXP/ lcUR/XHm4QWEthwsK5B7lQoIcOv+XQClPFyN0o1Wt00ClEqTa+J8IxsNggumrV6GPhbb ELe1iqSCxnT3gUAWr4BmwhsaVPR8692d14/YVZDrBAdoucPtUr4CZPJn7eKc//ZBWBDO w2WHbN035uhNZvxQ6pqFOi4Ot+1KFuqw/3lbSgVfCvFANYWqKpSE/4ymQ19i0mFUoL2u JsBA== X-Forwarded-Encrypted: i=1; AJvYcCXU62KjQ0Pmi7crS6C3br5vsRKSXHHmtrD1ndMtkPZ7qetiVqjFLVSHllx1aEXVu1qn8Os1wFHwySvLWaf5@lists.postgresql.org X-Gm-Message-State: AOJu0YyotWK98Lf4feI3YshazN7qdbZpUMOnZSGFHsL4oZ8RgBBi93iJ AP+JQbNDllqcjceFrKBKw+YSJC255tB7pbuFbBWMxUKMdXHIg28Dep1lDXtT6Z6f+SX9aXLECDA RA5TOxwKAa+ccnPLTZS3Q3JToKXE= X-Gm-Gg: ASbGncsytIRWjqP4ATrKrJTV67UmFSxw5qcNr0i9AdkvuVKW5ljaF+0wEPhzqMIhP64 k3DhRgu/mZtkbSrmRpUNfV1akEckssX7QeiRi6vej X-Google-Smtp-Source: AGHT+IFgyrNaXv0gD4TKr/prgYjPBnMLodsf2HlyqqnB4AWd/s71xt10mTkfJfEOpunMRI1IxIIwuwaCYMzgzz7K5nc= X-Received: by 2002:a05:6871:6114:b0:29e:532d:8f3d with SMTP id 586e51a60fabf-2aa066c6d61mr5516184fac.10.1736502083541; Fri, 10 Jan 2025 01:41:23 -0800 (PST) MIME-Version: 1.0 References: <11AA76D0-CAFE-4A17-BCCF-50520CCDF47F@thebuild.com> <051EB6AC-2395-4EAD-B30C-069FBC01107F@thebuild.com> <59d067bdcf17bd5a624eb7c736779853@postgrespro.ru> In-Reply-To: <59d067bdcf17bd5a624eb7c736779853@postgrespro.ru> From: Dominique Devienne Date: Fri, 10 Jan 2025 10:41:12 +0100 X-Gm-Features: AbW1kvakyVEtdtn9D-GuoBZ3Nkkd55ThRR69L4Rhq3BroB5dHUbQyNeCwsN7rzw Message-ID: Subject: Re: Postgres do not support tinyint? To: Vladlen Popolitov Cc: Igor Korot , Christophe Pettus , "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 On Fri, Jan 10, 2025 at 10:13=E2=80=AFAM Vladlen Popolitov wrote: > If you really need 1-byte integer, you can use "char" type. Cast it > to/from int. See comment at the end of the page > https://www.postgresql.org/docs/17/datatype-character.html Hi. What would be the best online doc to learn about the physical storage / format for rows/pages/btree, etc... To understand alignment, packing, varint or not, all those things. I'm quite familiar with the [SQLite format][1], having read that doc dozens of times, and I'd like a better low-level understanding for PostgreSQL as well. TIA, --DD [1]: https://www.sqlite.org/fileformat.html