aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-09-26 00:26:56 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-09-26 00:26:56 +0000
commitc86cc37f62548d5f88d4657a1094b259a38c471d (patch)
tree88b9e31e50fa3a55973d22534f465bc843d42f26 /src/backend/tcop/postgres.c
parent14946a80c0fd224326367d33f9fe7e086b447005 (diff)
downloadpostgresql-c86cc37f62548d5f88d4657a1094b259a38c471d.tar.gz
postgresql-c86cc37f62548d5f88d4657a1094b259a38c471d.zip
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.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c7
1 files changed, 5 insertions, 2 deletions
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.
*