Add pg_attribute_counted_by() to various flexible array members Annotate flexible array members whose element count is held by another member of the same struct, so that the compiler knows the real extent of these arrays.
This is an initial set of annotations. More will follow over time, but those might need more investigation or code adjustments. Author: Tristan Partin <[email protected]> Reviewed-by: Japin Li <[email protected]> Reviewed-by: Greg Burd <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/DKBEBF32QLUA.3L2DJRPUYNKHZ%40partin.io Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/7a04cac0c3b376922daa7e3b5d5c628aa0e661ba Modified Files -------------- contrib/hstore/hstore_io.c | 2 +- contrib/pageinspect/brinfuncs.c | 2 +- contrib/pg_visibility/pg_visibility.c | 2 +- src/backend/access/brin/brin_minmax_multi.c | 2 +- src/backend/access/nbtree/nbtutils.c | 2 +- src/backend/access/transam/multixact.c | 2 +- src/backend/access/transam/xact.c | 2 +- src/backend/access/transam/xlogprefetcher.c | 2 +- src/backend/catalog/index.c | 2 +- src/backend/commands/tablespace.c | 2 +- src/backend/commands/trigger.c | 2 +- src/backend/postmaster/bgworker.c | 2 +- src/backend/postmaster/checkpointer.c | 2 +- src/backend/replication/logical/reorderbuffer.c | 2 +- src/backend/storage/buffer/freelist.c | 2 +- src/backend/storage/ipc/dsm.c | 2 +- src/backend/storage/ipc/pmsignal.c | 2 +- src/backend/utils/adt/rowtypes.c | 4 ++-- src/backend/utils/adt/tsvector_op.c | 2 +- src/backend/utils/cache/typcache.c | 2 +- src/backend/utils/sort/sharedtuplestore.c | 2 +- src/backend/utils/sort/tuplesort.c | 2 +- src/bin/pg_dump/pg_dump.h | 2 +- src/bin/pg_rewind/filemap.h | 2 +- src/bin/pgbench/pgbench.c | 2 +- src/include/fe_utils/parallel_slot.h | 2 +- 26 files changed, 27 insertions(+), 27 deletions(-)
