Files
postgresql/src/include/commands/explain_dr.h
Robert Haas 77cb08be51 Avoid including explain.h in explain_format.h and explain_dr.h
As per a suggestion from Tom Lane, we do this by declaring "struct
ExplainState" here and refer to that rather than "ExplainState".

Also per Tom, CreateExplainSerializeDestReceiver was still defined
in explain.h in addition to explain_dr.h. Remove leftover prototype.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: http://postgr.es/m/CA+TgmoYtaad3i21V0jqua-fbr+CR0ix6uBvEX8_s6BG96abd=g@mail.gmail.com
2025-02-28 13:17:29 -05:00

33 lines
1006 B
C

/*-------------------------------------------------------------------------
*
* explain_dr.h
* prototypes for explain_dr.c
*
* Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
* Portions Copyright (c) 1994-5, Regents of the University of California
*
* src/include/commands/explain_dr.h
*
*-------------------------------------------------------------------------
*/
#ifndef EXPLAIN_DR_H
#define EXPLAIN_DR_H
#include "executor/instrument.h"
#include "tcop/dest.h"
struct ExplainState; /* avoid including explain.h here */
/* Instrumentation data for EXPLAIN's SERIALIZE option */
typedef struct SerializeMetrics
{
uint64 bytesSent; /* # of bytes serialized */
instr_time timeSpent; /* time spent serializing */
BufferUsage bufferUsage; /* buffers accessed during serialization */
} SerializeMetrics;
extern DestReceiver *CreateExplainSerializeDestReceiver(struct ExplainState *es);
extern SerializeMetrics GetSerializationMetrics(DestReceiver *dest);
#endif