1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

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
This commit is contained in:
Michael Paquier
2025-07-02 09:52:21 +09:00
parent bee23ea4dd
commit b45242fd30
4 changed files with 1145 additions and 1098 deletions

View File

@ -23,6 +23,7 @@ OBJS = \
arrayutils.o \ arrayutils.o \
ascii.o \ ascii.o \
bool.o \ bool.o \
bytea.o \
cash.o \ cash.o \
char.o \ char.o \
cryptohashfuncs.o \ cryptohashfuncs.o \

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,7 @@ backend_sources += files(
'arrayutils.c', 'arrayutils.c',
'ascii.c', 'ascii.c',
'bool.c', 'bool.c',
'bytea.c',
'cash.c', 'cash.c',
'char.c', 'char.c',
'cryptohashfuncs.c', 'cryptohashfuncs.c',

File diff suppressed because it is too large Load Diff