diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2025-09-15 10:48:30 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2025-09-15 11:04:10 +0200 |
commit | d4d1fc527bdb333d818038081c17ed7d9b1697c1 (patch) | |
tree | 3f5c4823780c7581fbcd083477d07f96fefd63a1 /src/include/executor/tablefunc.h | |
parent | 70407d39b7ea8fd41496489b5f6a30c285e7d7d0 (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/executor/tablefunc.h')
-rw-r--r-- | src/include/executor/tablefunc.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/include/executor/tablefunc.h b/src/include/executor/tablefunc.h index 2c4498c5955..4dd5fef4aea 100644 --- a/src/include/executor/tablefunc.h +++ b/src/include/executor/tablefunc.h @@ -14,7 +14,7 @@ #define _TABLEFUNC_H /* Forward-declare this to avoid including execnodes.h here */ -struct TableFuncScanState; +typedef struct TableFuncScanState TableFuncScanState; /* * TableFuncRoutine holds function pointers used for generating content of @@ -51,17 +51,17 @@ struct TableFuncScanState; */ typedef struct TableFuncRoutine { - void (*InitOpaque) (struct TableFuncScanState *state, int natts); - void (*SetDocument) (struct TableFuncScanState *state, Datum value); - void (*SetNamespace) (struct TableFuncScanState *state, const char *name, + void (*InitOpaque) (TableFuncScanState *state, int natts); + void (*SetDocument) (TableFuncScanState *state, Datum value); + void (*SetNamespace) (TableFuncScanState *state, const char *name, const char *uri); - void (*SetRowFilter) (struct TableFuncScanState *state, const char *path); - void (*SetColumnFilter) (struct TableFuncScanState *state, + void (*SetRowFilter) (TableFuncScanState *state, const char *path); + void (*SetColumnFilter) (TableFuncScanState *state, const char *path, int colnum); - bool (*FetchRow) (struct TableFuncScanState *state); - Datum (*GetValue) (struct TableFuncScanState *state, int colnum, + bool (*FetchRow) (TableFuncScanState *state); + Datum (*GetValue) (TableFuncScanState *state, int colnum, Oid typid, int32 typmod, bool *isnull); - void (*DestroyOpaque) (struct TableFuncScanState *state); + void (*DestroyOpaque) (TableFuncScanState *state); } TableFuncRoutine; #endif /* _TABLEFUNC_H */ |