public inbox for [email protected]  
help / color / mirror / Atom feed
From: Vladlen Popolitov <[email protected]>
To: Dominique Devienne <[email protected]>
Cc: Igor Korot <[email protected]>
Cc: Christophe Pettus <[email protected]>
Cc: David G. Johnston <[email protected]>
Cc: Ron Johnson <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: Postgres do not support tinyint?
Date: Fri, 10 Jan 2025 22:04:51 +0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAFCRh-87K0kLsXFSYeTj1xZvG-maq0qv4eRVt5iMs2j-6LNBMQ@mail.gmail.com>
References: <CA+FnnTzfvgVdptHcLBFPrq_Q+xPes-Bhjiw_xFiooq4VqhqyrQ@mail.gmail.com>
	<CANzqJaCxZK0j8fL-riZpX+AV+kyo9PcAvgF=H5DgaWK+C+66Vw@mail.gmail.com>
	<CAKFQuwYYgPxUSvo2UzOty5Cd1xw5+2q1bg3+zY-nsXNZyq+_4g@mail.gmail.com>
	<[email protected]>
	<CA+FnnTxf3VxTPzGFy7q-6ENVcV769F_5_=nbGOvK40qua8XPgg@mail.gmail.com>
	<[email protected]>
	<CA+FnnTyxnWjjaC4dDo6Y4DeCYAVa3dgGdsMg3sdTOFiyHAG7Ag@mail.gmail.com>
	<[email protected]>
	<CAFCRh-87K0kLsXFSYeTj1xZvG-maq0qv4eRVt5iMs2j-6LNBMQ@mail.gmail.com>

Dominique Devienne писал(а) 2025-01-10 16:41:
> On Fri, Jan 10, 2025 at 10:13 AM Vladlen Popolitov
> <[email protected]> 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

I would recommend "PostgreSQL Internals" of Egor Rogov (Chapter 3 about 
tuples,
other chapters also great)
Free download from https://postgrespro.com/community/books/internals

Also PostgreSQL source code is officially the part of the documentation.
It is not joke. PostgreSQL source has clear comments in functions code
and in structure declarations. You can compare with other sources, it is 
hard to find better
comments made with love.

Heap tuple information is in source file 
src/include/access/htup_details.h (HeapTupleHeaderData
structure), but I recommend to read above book first, it simplier 
explains many
internal concepts.
-- 
Best regards,

Vladlen Popolitov.






view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Postgres do not support tinyint?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox