1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

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
This commit is contained in:
Peter Eisentraut
2024-10-17 08:36:14 +02:00
parent 41b023946d
commit eafda78fc4
3 changed files with 5 additions and 5 deletions

View File

@ -3077,7 +3077,7 @@ transformCreateTableAsStmt(ParseState *pstate, CreateTableAsStmt *stmt)
* in the IntoClause because that's where intorel_startup() can
* conveniently get it from.
*/
stmt->into->viewQuery = (Node *) copyObject(query);
stmt->into->viewQuery = copyObject(query);
}
/* represent the command as a utility Query */