public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: [email protected]
Subject: pgsql: Improve type handling of varlena structures
Date: Tue, 10 Feb 2026 22:34:11 +0000
Message-ID: <[email protected]> (raw)

Improve type handling of varlena structures

This commit changes the definition of varlena to a typedef, so as it
becomes possible to remove "struct" markers from various declarations in
the code base.  Historically, "struct" markers are not the project style
for variable declarations, so this update simplifies the code and makes
it more consistent across the board.

This change has an impact on the following structures, simplifying
declarations using them:
- varlena
- varatt_indirect
- varatt_external

This cleanup has come up in a different path set that played with
TOAST and varatt.h, independently worth doing on its own.

Reviewed-by: Álvaro Herrera <[email protected]>
Reviewed-by: Andreas Karlsson <[email protected]>
Reviewed-by: Shinya Kato <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Reviewed-by: Chao Li <[email protected]>
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9181c870bada196711206f3a795bde6b8c43dcd3

Modified Files
--------------
contrib/amcheck/verify_heapam.c                 |   8 +-
contrib/btree_gist/btree_utils_var.c            |   4 +-
contrib/pageinspect/heapfuncs.c                 |   2 +-
doc/src/sgml/storage.sgml                       |   2 +-
src/backend/access/brin/brin_tuple.c            |   2 +-
src/backend/access/common/detoast.c             | 102 ++++++++++++------------
src/backend/access/common/indextuple.c          |   2 +-
src/backend/access/common/toast_compression.c   |  54 ++++++-------
src/backend/access/common/toast_internals.c     |  22 ++---
src/backend/access/hash/hashfunc.c              |   4 +-
src/backend/access/heap/heapam.c                |   2 +-
src/backend/access/heap/heaptoast.c             |  14 ++--
src/backend/access/table/toast_helper.c         |  10 +--
src/backend/executor/tstoreReceiver.c           |   2 +-
src/backend/replication/logical/reorderbuffer.c |  22 ++---
src/backend/storage/large_object/inv_api.c      |   2 +-
src/backend/utils/adt/datum.c                   |  12 +--
src/backend/utils/adt/expandedrecord.c          |   4 +-
src/backend/utils/adt/rowtypes.c                |   4 +-
src/backend/utils/adt/varlena.c                 |  10 +--
src/backend/utils/fmgr/fmgr.c                   |  18 ++---
src/include/access/detoast.h                    |  12 +--
src/include/access/heaptoast.h                  |   2 +-
src/include/access/tableam.h                    |   4 +-
src/include/access/toast_compression.h          |  18 ++---
src/include/access/toast_helper.h               |   2 +-
src/include/access/toast_internals.h            |   2 +-
src/include/c.h                                 |  14 ++--
src/include/fmgr.h                              |  20 ++---
src/include/utils/varbit.h                      |   2 +-
src/include/utils/xml.h                         |   2 +-
src/include/varatt.h                            |  24 +++---
src/pl/plpgsql/src/pl_exec.c                    |   2 +-
src/test/regress/regress.c                      |  12 +--
src/tools/pgindent/typedefs.list                |   3 +
35 files changed, 212 insertions(+), 209 deletions(-)



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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Improve type handling of varlena structures
  In-Reply-To: <[email protected]>

* 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