pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Move code for the bytea data type from varlena.c to new bytea.c
Date: Wed, 02 Jul 2025 00:52:52 +0000
Message-ID: <E1uWliW-004GxT-2H@gemulon.postgresql.org> (raw)

Move code for the bytea data type from varlena.c to new bytea.c

This commit moves all the routines related to the bytea data type into
its own new file, called bytea.c, clearing some of the bloat in
varlena.c.  This includes the routines for:
- Input, output, receive and send
- Comparison
- Casts to integer types
- bytea-specific functions

The internals of the routines moved here are unchanged, with one
exception.  This comes with a twist in bytea_string_agg_transfn(), where
the call to makeStringAggState() is replaced by the internals of this
routine, still located in varlena.c.  This simplifies the move to the
new file by not having to expose makeStringAggState().

Author: Aleksander Alekseev <aleksander@timescale.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/CAJ7c6TMPVPJ5DL447zDz5ydctB8OmuviURtSwd=PHCRFEPDEAQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b45242fd30ffa6e1e7f490cc400ecbd966880f41

Modified Files
--------------
src/backend/utils/adt/Makefile    |    1 +
src/backend/utils/adt/bytea.c     | 1143 ++++++++++++++++++++++++++++++++++
src/backend/utils/adt/meson.build |    1 +
src/backend/utils/adt/varlena.c   | 1214 ++-----------------------------------
4 files changed, 1203 insertions(+), 1156 deletions(-)



Message-ID: <E1uWliW-004GxT-2H@gemulon.postgresql.org>
Permalink:  ../E1uWliW-004GxT-2H@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uWliW-004GxT-2H@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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Move code for the bytea data type from varlena.c to new bytea.c
  In-Reply-To: <E1uWliW-004GxT-2H@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox