Re: Making type Datum be 8 bytes everywhere - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Making type Datum be 8 bytes everywhere
Date
Msg-id juc3q6sqti2tibq52va4nayzccwutwfcrpyrociiy3qecpeqnm@qvtxgrajjrkj
Whole thread Raw
In response to Re: Making type Datum be 8 bytes everywhere  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Making type Datum be 8 bytes everywhere
List pgsql-hackers
Hi,

On 2025-08-12 08:30:43 +0200, Peter Eisentraut wrote:
> I'm also thinking, as a follow-on project, we could get rid of typbyval and
> require that typbyval == (typlen > 0 && typlen <= 8).  Something to think
> about.

We currently have types that aren't typbyval despite fitting those criteria:

postgres[1606972][1]=# SELECT oid::regtype, typlen FROM pg_type WHERE typlen > 0 and typlen <= 8 and not typbyval;
┌──────────┬────────┐
│   oid    │ typlen │
├──────────┼────────┤
│ tid      │      6 │
│ macaddr  │      6 │
│ macaddr8 │      8 │
└──────────┴────────┘
(3 rows)


Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Dmitry Koval
Date:
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Next
From: Andres Freund
Date:
Subject: Re: Adding basic NUMA awareness