| From: | John Naylor <john(dot)naylor(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Separate out bytea sort support from varlena.c |
| Date: | 2025-12-16 08:26:19 |
| Message-ID: | E1vVQNu-0012jI-0M@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Separate out bytea sort support from varlena.c
In the wake of commit b45242fd3, bytea_sortsupport() still called out
to varstr_sortsupport(). Treating bytea as a kind of text/varchar
required varstr_sortsupport() to allow for the possibility of
NUL bytes, but only for C collation. This was confusing. For
better separation of concerns, create an independent sortsupport
implementation in bytea.c.
The heuristics for bytea_abbrev_abort() remain the same as for
varstr_abbrev_abort(). It's possible that the bytea case warrants
different treatment, but that is left for future investigation.
In passing, adjust some strange looking comparisons in
varstr_abbrev_abort().
Author: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
Reviewed-by: John Naylor <johncnaylorls(at)gmail(dot)com>
Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAJ7c6TP1bAbEhUJa6+rgceN6QJWMSsxhg1=mqfSN=Nb-n6DAKg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9303d62c6db0207b8c2649205f7bc9350c1f62db
Modified Files
--------------
src/backend/utils/adt/bytea.c | 238 ++++++++++++++++++++++++++++++++++++++-
src/backend/utils/adt/varlena.c | 43 ++-----
src/tools/pgindent/typedefs.list | 1 +
3 files changed, 242 insertions(+), 40 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Gustafsson | 2025-12-16 08:56:19 | pgsql: doc: Update header file mention for CompareType |
| Previous Message | Michael Paquier | 2025-12-16 05:29:07 | pgsql: Add TAP test to check recovery when redo LSN is missing |