diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-01-15 13:39:33 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-01-15 13:39:33 -0500 |
commit | 8e166e164c7c4531d7eb150d836aa2357989237a (patch) | |
tree | 1cf5abe76f86c4a4bee68e714b03aeebbe0dafa8 /src/include/commands/explain.h | |
parent | a5cd70dcbc268381e13cb0b2973b5732856d186f (diff) | |
download | postgresql-8e166e164c7c4531d7eb150d836aa2357989237a.tar.gz postgresql-8e166e164c7c4531d7eb150d836aa2357989237a.zip |
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.
Diffstat (limited to 'src/include/commands/explain.h')
-rw-r--r-- | src/include/commands/explain.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h index 598f37428d2..c9f722361a1 100644 --- a/src/include/commands/explain.h +++ b/src/include/commands/explain.h @@ -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); |