summaryrefslogtreecommitdiff
path: root/src/include/optimizer/optimizer.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-09-15 10:48:30 +0200
committerPeter Eisentraut <peter@eisentraut.org>2025-09-15 11:04:10 +0200
commitd4d1fc527bdb333d818038081c17ed7d9b1697c1 (patch)
tree3f5c4823780c7581fbcd083477d07f96fefd63a1 /src/include/optimizer/optimizer.h
parent70407d39b7ea8fd41496489b5f6a30c285e7d7d0 (diff)
Update various forward declarations to use typedef
There are a number of forward declarations that use struct but not the customary typedef, because that could have led to repeat typedefs, which was not allowed. This is now allowed in C11, so we can update these to provide the typedefs as well, so that the later uses of the types look more consistent. Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/10d32190-f31b-40a5-b177-11db55597355@eisentraut.org
Diffstat (limited to 'src/include/optimizer/optimizer.h')
-rw-r--r--src/include/optimizer/optimizer.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/include/optimizer/optimizer.h b/src/include/optimizer/optimizer.h
index a42abac01bf..04878f1f1c2 100644
--- a/src/include/optimizer/optimizer.h
+++ b/src/include/optimizer/optimizer.h
@@ -35,9 +35,9 @@ typedef struct IndexOptInfo IndexOptInfo;
typedef struct SpecialJoinInfo SpecialJoinInfo;
/* It also seems best not to include plannodes.h, params.h, or htup.h here */
-struct PlannedStmt;
-struct ParamListInfoData;
-struct HeapTupleData;
+typedef struct PlannedStmt PlannedStmt;
+typedef struct ParamListInfoData *ParamListInfo;
+typedef struct HeapTupleData *HeapTuple;
/* in path/clausesel.c: */
@@ -102,9 +102,9 @@ extern PGDLLIMPORT int debug_parallel_query;
extern PGDLLIMPORT bool parallel_leader_participation;
extern PGDLLIMPORT bool enable_distinct_reordering;
-extern struct PlannedStmt *planner(Query *parse, const char *query_string,
- int cursorOptions,
- struct ParamListInfoData *boundParams);
+extern PlannedStmt *planner(Query *parse, const char *query_string,
+ int cursorOptions,
+ ParamListInfo boundParams);
extern Expr *expression_planner(Expr *expr);
extern Expr *expression_planner_with_deps(Expr *expr,
@@ -147,7 +147,7 @@ extern bool var_is_nonnullable(PlannerInfo *root, Var *var, bool use_rel_info);
extern List *expand_function_arguments(List *args, bool include_out_arguments,
Oid result_type,
- struct HeapTupleData *func_tuple);
+ HeapTuple func_tuple);
extern ScalarArrayOpExpr *make_SAOP_expr(Oid oper, Node *leftexpr,
Oid coltype, Oid arraycollid,