Обсуждение: pgsql: Rearrange explain.c's API so callers need not embed sizeof(Expla

Поиск
Список
Период
Сортировка

pgsql: Rearrange explain.c's API so callers need not embed sizeof(Expla

От
Tom Lane
Дата:
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8e166e164c7c4531d7eb150d836aa2357989237a

Modified Files
--------------
contrib/auto_explain/auto_explain.c |   43 +++++++++++------------
src/backend/commands/explain.c      |   66 +++++++++++++++++------------------
src/include/commands/explain.h      |    2 +-
3 files changed, 55 insertions(+), 56 deletions(-)