mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +03:00
Rearrange explain.c's API so callers need not embed sizeof(ExplainState).
The folly of the previous arrangement was just demonstrated: there's no convenient way to add fields to ExplainState without breaking ABI, even if callers have no need to touch those fields. Since we might well need to do that again someday in back branches, let's change things so that only explain.c has to have sizeof(ExplainState) compiled into it. This costs one extra palloc() per EXPLAIN operation, which is surely pretty negligible.
This commit is contained in:
@@ -60,7 +60,7 @@ extern PGDLLIMPORT explain_get_index_name_hook_type explain_get_index_name_hook;
|
||||
extern void ExplainQuery(ExplainStmt *stmt, const char *queryString,
|
||||
ParamListInfo params, DestReceiver *dest);
|
||||
|
||||
extern void ExplainInitState(ExplainState *es);
|
||||
extern ExplainState *NewExplainState(void);
|
||||
|
||||
extern TupleDesc ExplainResultDesc(ExplainStmt *stmt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user