Improve node type forward reference

Peter Eisentraut <peter@eisentraut.org>

Commit: eafda78fc404c706da4cfa254dafb3e97f6cd111
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2024-10-17T06:36:48Z
Releases: 18.0
Improve node type forward reference

Instead of using Node *, we can use an incomplete struct.  That way,
everything has the correct type and fewer casts are required.  This
technique is already used elsewhere in node type definitions.

Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Tender Wang <tndrwang@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/637eeea8-5663-460b-a114-39572c0f6c6e%40eisentraut.org

Files

PathChange+/−
src/backend/commands/createas.c modified +1 −1
src/backend/parser/analyze.c modified +1 −1
src/include/nodes/primnodes.h modified +3 −3

Discussion