]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add all required calls to TupleDescFinalize()
authorDavid Rowley <drowley@postgresql.org>
Sun, 15 Mar 2026 22:45:49 +0000 (11:45 +1300)
committerDavid Rowley <drowley@postgresql.org>
Sun, 15 Mar 2026 22:45:49 +0000 (11:45 +1300)
commit503620311e3fc127708b00d4cd7eff6fd3154753
treeb7d17ce7606dacead73613fdb3ac851917bba5f7
parente5a77d876dbb6168e3013d32198794c535f1627d
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 <dgrowleyml@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: John Naylor <johncnaylorls@gmail.com>
Reviewed-by: Amit Langote <amitlangote09@gmail.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Junwang Zhao <zhjwpku@gmail.com>
Discussion: https://postgr.es/m/CAApHDvpoFjaj3%2Bw_jD5uPnGazaw41A71tVJokLDJg2zfcigpMQ%40mail.gmail.com
39 files changed:
contrib/dblink/dblink.c
contrib/pg_buffercache/pg_buffercache_pages.c
contrib/pg_visibility/pg_visibility.c
src/backend/access/brin/brin_tuple.c
src/backend/access/common/tupdesc.c
src/backend/access/gin/ginutil.c
src/backend/access/gist/gistscan.c
src/backend/access/spgist/spgutils.c
src/backend/access/transam/twophase.c
src/backend/access/transam/xlogfuncs.c
src/backend/backup/basebackup_copy.c
src/backend/catalog/index.c
src/backend/catalog/pg_publication.c
src/backend/catalog/toasting.c
src/backend/commands/explain.c
src/backend/commands/functioncmds.c
src/backend/commands/sequence.c
src/backend/commands/tablecmds.c
src/backend/commands/wait.c
src/backend/executor/execSRF.c
src/backend/executor/execTuples.c
src/backend/executor/nodeFunctionscan.c
src/backend/parser/parse_relation.c
src/backend/parser/parse_target.c
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/backend/replication/walsender.c
src/backend/utils/adt/acl.c
src/backend/utils/adt/genfile.c
src/backend/utils/adt/lockfuncs.c
src/backend/utils/adt/orderedsetaggs.c
src/backend/utils/adt/pgstatfuncs.c
src/backend/utils/adt/tsvector_op.c
src/backend/utils/cache/relcache.c
src/backend/utils/fmgr/funcapi.c
src/backend/utils/misc/guc_funcs.c
src/include/access/tupdesc.h
src/pl/plpgsql/src/pl_comp.c
src/test/modules/test_custom_stats/test_custom_fixed_stats.c
src/test/modules/test_predtest/test_predtest.c