Re: Making type Datum be 8 bytes everywhere

From: Andres Freund <andres(at)anarazel(dot)de>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Joe Conway <mail(at)joeconway(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Making type Datum be 8 bytes everywhere
Date: 2025-08-12 14:11:15
Message-ID: juc3q6sqti2tibq52va4nayzccwutwfcrpyrociiy3qecpeqnm@qvtxgrajjrkj
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-08-12 14:24:15 Re: Adding basic NUMA awareness
Previous Message Dmitry Koval 2025-08-12 13:09:37 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands