From c86cc37f62548d5f88d4657a1094b259a38c471d Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 26 Sep 2004 00:26:56 +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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 23e8c75e166..b091f5d3dbd 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.375.2.1 2003/11/24 14:50:02 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.375.2.2 2004/09/26 00:26:53 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -2659,7 +2659,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.375.2.1 $ $Date: 2003/11/24 14:50:02 $\n"); + puts("$Revision: 1.375.2.2 $ $Date: 2004/09/26 00:26:53 $\n"); } /* @@ -2709,6 +2709,9 @@ PostgresMain(int argc, char *argv[], const char *username) DisableNotifyInterrupt(); debug_query_string = NULL; + /* Make sure libpq is in a good state */ + pq_comm_reset(); + /* * Make sure we are in a valid memory context during recovery. * -- cgit v1.2.3