Re: [PATCH] Avoid collation lookup for "char" statistics
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Feng Wu <wufengwufengwufeng@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2026-06-27T02:44:07Z
Lists: pgsql-hackers
Feng Wu <wufengwufengwufeng@gmail.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
Commits
-
Avoid collation lookup failure when considering a "char" column.
- b574fec00f27 19 (unreleased) landed
- 5fd1c3f28718 18 (unreleased) landed
-
Remove lc_collate_is_c().
- 06421b084364 18.0 cited