From 09a893117a9fe0ae5e7e5c6a6a5496e9e6826f4c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 26 Sep 2004 00:26:28 +0000 Subject: Repair bug that would allow libpq to think a command had succeeded when it really hadn't, due to double output of previous command's response. Fix prevents recursive entry to libpq routines. Found by Jan Wieck. --- src/backend/tcop/postgres.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 85fcc49c839..5658e10d453 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.432 2004/09/13 20:07:05 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.433 2004/09/26 00:26:25 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -2811,6 +2811,9 @@ PostgresMain(int argc, char *argv[], const char *username) DisableNotifyInterrupt(); DisableCatchupInterrupt(); + /* Make sure libpq is in a good state */ + pq_comm_reset(); + /* Report the error to the client and/or server log */ EmitErrorReport(); -- cgit v1.2.3