public inbox for [email protected]
help / color / mirror / Atom feedFrom: Igor Korot <[email protected]>
To: Ron Johnson <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: Postgres do not support tinyint?
Date: Wed, 8 Jan 2025 00:26:32 -0600
Message-ID: <CA+FnnTz6GK0rKuC+g+LH25-N75ej-WGq7WZ1kpQZ9gtSbDeA+g@mail.gmail.com> (raw)
In-Reply-To: <CANzqJaCxZK0j8fL-riZpX+AV+kyo9PcAvgF=H5DgaWK+C+66Vw@mail.gmail.com>
References: <CA+FnnTzfvgVdptHcLBFPrq_Q+xPes-Bhjiw_xFiooq4VqhqyrQ@mail.gmail.com>
<CANzqJaCxZK0j8fL-riZpX+AV+kyo9PcAvgF=H5DgaWK+C+66Vw@mail.gmail.com>
Hi, Ron,
On Tue, Jan 7, 2025 at 11:24 PM Ron Johnson <[email protected]> wrote:
>
> On Wed, Jan 8, 2025 at 12:06 AM Igor Korot <[email protected]> wrote:
>>
>> 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 waste
>> 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 smallest 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 <Redacted>, and butter sauce.
> Don't boil me, I'm still alive.
> <Redacted> lobster!
view thread (2+ 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]
Subject: Re: Postgres do not support tinyint?
In-Reply-To: <CA+FnnTz6GK0rKuC+g+LH25-N75ej-WGq7WZ1kpQZ9gtSbDeA+g@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