agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: John Naylor <john.naylor@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Separate out bytea sort support from varlena.c
Date: Tue, 16 Dec 2025 08:26:19 +0000
Message-ID: <E1vVQNu-0012jI-0M@gemulon.postgresql.org> (raw)
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@tigerdata.com>
Reviewed-by: John Naylor <johncnaylorls@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.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(-)
view thread (3+ messages) latest in thread
Message-ID: <E1vVQNu-0012jI-0M@gemulon.postgresql.org>
Permalink: ../E1vVQNu-0012jI-0M@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1vVQNu-0012jI-0M@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: john.naylor@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Separate out bytea sort support from varlena.c
In-Reply-To: <E1vVQNu-0012jI-0M@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox