public inbox for [email protected]  
help / color / mirror / Atom feed
From: Igor Korot <[email protected]>
To: 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: Wed, 8 Jan 2025 13:40:38 -0600
Message-ID: <CA+FnnTyxnWjjaC4dDo6Y4DeCYAVa3dgGdsMg3sdTOFiyHAG7Ag@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
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]>

Hi, Christopphe,

On Wed, Jan 8, 2025 at 1:34 PM Christophe Pettus <[email protected]> wrote:
>
>
>
> > On Jan 8, 2025, at 11:30, Igor Korot <[email protected]> wrote:
> > There is no boolean - it is 0-4 inclusive.
>
> Unless you have somehow gotten PostgreSQL running on an IBM 7070, the range 0-4 can be represented by three binary digits, aka booleans. :-)

The only booleans I know of are 0 and 1. ;-)

>
> To be serious, though, the situation is:
>
> 1. If there are just one or two tinyints, having a tinyint type wouldn't save any space in the row.

No it is not a lot of them.
So then "smallint" is the best bet, right?

Thank you

> 2. If there are a lot of them, it's worth encoding them into a bitstring.






view thread (7+ messages)  latest in thread

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]
  Subject: Re: Postgres do not support tinyint?
  In-Reply-To: <CA+FnnTyxnWjjaC4dDo6Y4DeCYAVa3dgGdsMg3sdTOFiyHAG7Ag@mail.gmail.com>

* 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