Add some const qualifiers enabled by typeof_unqual change on copyObject The recent commit to change copyObject() to use typeof_unqual allows cleaning up some APIs to take advantage of this improved qualifier handling. EventTriggerCollectSimpleCommand() is a good example: It takes a node tree and makes a copy that it keeps around for its internal purposes, but it can't communicate via its function signature that it promises not scribble on the passed node tree. That is now fixed.
Reviewed-by: David Geier <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/92f9750f-c7f6-42d8-9a4a-85a3cbe808f3%40eisentraut.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/7724cb9935a96eabba80f5e62ee4b32068967dd2 Modified Files -------------- src/backend/catalog/index.c | 2 +- src/backend/commands/event_trigger.c | 14 +++++++------- src/backend/commands/indexcmds.c | 4 ++-- src/backend/commands/trigger.c | 4 ++-- src/backend/optimizer/prep/prepjointree.c | 4 ++-- src/backend/partitioning/partprune.c | 12 ++++++------ src/backend/rewrite/rewriteManip.c | 17 ++++++++++------- src/backend/utils/cache/plancache.c | 2 +- src/include/commands/defrem.h | 2 +- src/include/commands/event_trigger.h | 14 +++++++------- src/include/commands/trigger.h | 4 ++-- src/include/rewrite/rewriteManip.h | 4 ++-- src/include/utils/plancache.h | 2 +- 13 files changed, 44 insertions(+), 41 deletions(-)
