Re: Postgres do not support tinyint?

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgres do not support tinyint?
Date: 2025-01-08 06:49:08
Message-ID: 11AA76D0-CAFE-4A17-BCCF-50520CCDF47F@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Jan 7, 2025, at 22:44, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
> You suggest a type with a minimum size of 6 bytes when the complaint is that the otherwise acceptable 2 byte data type is too large?

Although it's not clear from the OP's question, if there are going to be a significant number of these 3-bit fields, packing them into a bitstring might be a way forward. It's a good solution for tables with a ton of booleans.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2025-01-08 06:53:34 Re: Postgres do not support tinyint?
Previous Message David G. Johnston 2025-01-08 06:44:21 Re: Postgres do not support tinyint?