Re: [PATCH] Avoid collation lookup for "char" statistics

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Feng Wu <wufengwufengwufeng(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Avoid collation lookup for "char" statistics
Date: 2026-06-27 02:44:07
Message-ID: 1287409.1782528247@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Feng Wu <wufengwufengwufeng(at)gmail(dot)com> writes:
> The internal "char" type is not collatable, and its btree operators
> order the byte value directly. Return the one-byte string for CHAROID
> without consulting collation state, avoiding a lookup of InvalidOid as
> collation 0.

Can you demonstrate that there is a problem worth worrying about here?
We've had no field reports of failures in this code, and I don't see
a problem with, e.g.

explain select * from pg_type a join pg_type b using (typtype);

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Dilip Kumar 2026-06-27 02:37:51 Re: Proposal: Conflict log history table for Logical Replication