pgsql: Improve type handling of varlena structures

Поиск
Список
Период
Сортировка
Искать

pgsql: Improve type handling of varlena structures

От:
Michael Paquier <michael@paquier.xyz>
Дата:
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 
Reviewed-by: Andreas Karlsson 
Reviewed-by: Shinya Kato 
Reviewed-by: Tom Lane 
Reviewed-by: Chao Li 
Discussion: https://postgr.es/m/aW8xvVbovdhyI4yo@paquier.xyz

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(-)

FAQ