]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Improve type handling of varlena structures
authorMichael Paquier <michael@paquier.xyz>
Tue, 10 Feb 2026 22:33:24 +0000 (07:33 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 10 Feb 2026 22:33:24 +0000 (07:33 +0900)
commit9181c870bada196711206f3a795bde6b8c43dcd3
tree160d8515f4f7a357223d59d8dad8b13464f0a9ad
parent0d4391b265f83023d0b7eed71817517410f76e60
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 <alvherre@kurilemu.de>
Reviewed-by: Andreas Karlsson <andreas@proxel.se>
Reviewed-by: Shinya Kato <shinya11.kato@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/aW8xvVbovdhyI4yo@paquier.xyz
35 files changed:
contrib/amcheck/verify_heapam.c
contrib/btree_gist/btree_utils_var.c
contrib/pageinspect/heapfuncs.c
doc/src/sgml/storage.sgml
src/backend/access/brin/brin_tuple.c
src/backend/access/common/detoast.c
src/backend/access/common/indextuple.c
src/backend/access/common/toast_compression.c
src/backend/access/common/toast_internals.c
src/backend/access/hash/hashfunc.c
src/backend/access/heap/heapam.c
src/backend/access/heap/heaptoast.c
src/backend/access/table/toast_helper.c
src/backend/executor/tstoreReceiver.c
src/backend/replication/logical/reorderbuffer.c
src/backend/storage/large_object/inv_api.c
src/backend/utils/adt/datum.c
src/backend/utils/adt/expandedrecord.c
src/backend/utils/adt/rowtypes.c
src/backend/utils/adt/varlena.c
src/backend/utils/fmgr/fmgr.c
src/include/access/detoast.h
src/include/access/heaptoast.h
src/include/access/tableam.h
src/include/access/toast_compression.h
src/include/access/toast_helper.h
src/include/access/toast_internals.h
src/include/c.h
src/include/fmgr.h
src/include/utils/varbit.h
src/include/utils/xml.h
src/include/varatt.h
src/pl/plpgsql/src/pl_exec.c
src/test/regress/regress.c
src/tools/pgindent/typedefs.list