mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Revise backend libpq interfaces so that messages to the frontend
can be generated in a buffer and then sent to the frontend in a single libpq call. This solves problems with NOTICE and ERROR messages generated in the middle of a data message or COPY OUT operation.
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Copyright (c) 1994-5, Regents of the University of California
|
||||
*
|
||||
* $Id: explain.c,v 1.34 1999/04/23 21:23:48 momjian Exp $
|
||||
* $Id: explain.c,v 1.35 1999/04/25 03:19:09 tgl Exp $
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
@ -350,18 +350,13 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
|
||||
static char *
|
||||
Explain_PlanToString(Plan *plan, ExplainState *es)
|
||||
{
|
||||
StringInfo str;
|
||||
char *s;
|
||||
StringInfoData str;
|
||||
|
||||
if (plan == NULL)
|
||||
return "";
|
||||
Assert(plan != NULL);
|
||||
str = makeStringInfo();
|
||||
explain_outNode(str, plan, 0, es);
|
||||
s = str->data;
|
||||
pfree(str);
|
||||
|
||||
return s;
|
||||
/* see stringinfo.h for an explanation of this maneuver */
|
||||
initStringInfo(&str);
|
||||
if (plan != NULL)
|
||||
explain_outNode(&str, plan, 0, es);
|
||||
return str.data;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user