Add some const qualifiers enabled by typeof_unqual change on copyObject
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-03-19T05:35:54Z
Releases:
19 (unreleased)
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 <geidav.pg@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/92f9750f-c7f6-42d8-9a4a-85a3cbe808f3%40eisentraut.org
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/index.c | modified | +1 −1 |
| src/backend/commands/event_trigger.c | modified | +7 −7 |
| src/backend/commands/indexcmds.c | modified | +2 −2 |
| src/backend/commands/trigger.c | modified | +2 −2 |
| src/backend/optimizer/prep/prepjointree.c | modified | +2 −2 |
| src/backend/partitioning/partprune.c | modified | +6 −6 |
| src/backend/rewrite/rewriteManip.c | modified | +10 −7 |
| src/backend/utils/cache/plancache.c | modified | +1 −1 |
| src/include/commands/defrem.h | modified | +1 −1 |
| src/include/commands/event_trigger.h | modified | +7 −7 |
| src/include/commands/trigger.h | modified | +2 −2 |
| src/include/rewrite/rewriteManip.h | modified | +2 −2 |
| src/include/utils/plancache.h | modified | +1 −1 |
Discussion
- Change copyObject() to use typeof_unqual 31 messages · 2026-01-20 → 2026-06-17