Add all required calls to TupleDescFinalize() As of this commit all TupleDescs must have TupleDescFinalize() called on them once the TupleDesc is set up and before BlessTupleDesc() is called.
In this commit, TupleDescFinalize() does nothing. This change has only been separated out from the commit that properly implements this function to make the change more obvious. Any extension which makes its own TupleDesc will need to be modified to call the new function. The follow-up commit which properly implements TupleDescFinalize() will cause any code which forgets to do this to fail in assert-enabled builds in BlessTupleDesc(). It may still be worth mentioning this change in the release notes so that extension authors update their code. Author: David Rowley <[email protected]> Reviewed-by: Chao Li <[email protected]> Reviewed-by: Andres Freund <[email protected]> Reviewed-by: John Naylor <[email protected]> Reviewed-by: Amit Langote <[email protected]> Reviewed-by: Zsolt Parragi <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Reviewed-by: Junwang Zhao <[email protected]> Discussion: https://postgr.es/m/CAApHDvpoFjaj3%2Bw_jD5uPnGazaw41A71tVJokLDJg2zfcigpMQ%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/503620311e3fc127708b00d4cd7eff6fd3154753 Modified Files -------------- contrib/dblink/dblink.c | 4 ++++ contrib/pg_buffercache/pg_buffercache_pages.c | 2 ++ contrib/pg_visibility/pg_visibility.c | 2 ++ src/backend/access/brin/brin_tuple.c | 1 + src/backend/access/common/tupdesc.c | 13 +++++++++++++ src/backend/access/gin/ginutil.c | 1 + src/backend/access/gist/gistscan.c | 1 + src/backend/access/spgist/spgutils.c | 1 + src/backend/access/transam/twophase.c | 1 + src/backend/access/transam/xlogfuncs.c | 1 + src/backend/backup/basebackup_copy.c | 3 +++ src/backend/catalog/index.c | 2 ++ src/backend/catalog/pg_publication.c | 1 + src/backend/catalog/toasting.c | 6 ++++++ src/backend/commands/explain.c | 1 + src/backend/commands/functioncmds.c | 1 + src/backend/commands/sequence.c | 1 + src/backend/commands/tablecmds.c | 4 ++++ src/backend/commands/wait.c | 1 + src/backend/executor/execSRF.c | 2 ++ src/backend/executor/execTuples.c | 4 ++++ src/backend/executor/nodeFunctionscan.c | 2 ++ src/backend/parser/parse_relation.c | 4 +++- src/backend/parser/parse_target.c | 2 ++ src/backend/replication/libpqwalreceiver/libpqwalreceiver.c | 1 + src/backend/replication/walsender.c | 5 +++++ src/backend/utils/adt/acl.c | 1 + src/backend/utils/adt/genfile.c | 1 + src/backend/utils/adt/lockfuncs.c | 1 + src/backend/utils/adt/orderedsetaggs.c | 1 + src/backend/utils/adt/pgstatfuncs.c | 5 +++++ src/backend/utils/adt/tsvector_op.c | 1 + src/backend/utils/cache/relcache.c | 8 ++++++++ src/backend/utils/fmgr/funcapi.c | 6 ++++++ src/backend/utils/misc/guc_funcs.c | 5 +++++ src/include/access/tupdesc.h | 1 + src/pl/plpgsql/src/pl_comp.c | 2 ++ .../modules/test_custom_stats/test_custom_fixed_stats.c | 1 + src/test/modules/test_predtest/test_predtest.c | 1 + 39 files changed, 100 insertions(+), 1 deletion(-)
