aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2000-03-16 15:34:36 +0000
committerBruce Momjian <bruce@momjian.us>2000-03-16 15:34:36 +0000
commit3e4708c45cc0c550cca2f089193b0510b3c448f5 (patch)
treed635d7ce5e94046fe58692a1b5e4749b1f1d91f5
parent1f3122e26d594ffbb873b9b6de239f9879987c59 (diff)
downloadpostgresql-3e4708c45cc0c550cca2f089193b0510b3c448f5.tar.gz
postgresql-3e4708c45cc0c550cca2f089193b0510b3c448f5.zip
libpq++ Makefile uses -DDEBUG to turn on debugging trace to
/tmp/trace.out. However, elog.h uses DEBUG as a log-level flag. As a result, tracing is turned on even if the libpq++.so is built with DEBUG commented out in the Makefile. This patch changes libpq++ to use DEBUGFILE instead (which is not defined anywhere else). Oliver Elphick
-rw-r--r--src/interfaces/libpq++/Makefile.in4
-rw-r--r--src/interfaces/libpq++/pgconnection.cc6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/interfaces/libpq++/Makefile.in b/src/interfaces/libpq++/Makefile.in
index d8512543120..8b579104d4e 100644
--- a/src/interfaces/libpq++/Makefile.in
+++ b/src/interfaces/libpq++/Makefile.in
@@ -6,7 +6,7 @@
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.21 2000/03/08 01:58:37 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.22 2000/03/16 15:34:36 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -34,7 +34,7 @@ CXXFLAGS+= -I$(SRCDIR)/backend \
-I$(SRCHEADERDIR) \
-I$(LIBPQDIR)
-#CXXFLAGS+= -DDEBUG
+#CXXFLAGS+= -DDEBUGFILE
ifdef KRBVERS
CXXFLAGS+= $(KRBFLAGS)
diff --git a/src/interfaces/libpq++/pgconnection.cc b/src/interfaces/libpq++/pgconnection.cc
index 3ba7f893bd1..3afbb57aa60 100644
--- a/src/interfaces/libpq++/pgconnection.cc
+++ b/src/interfaces/libpq++/pgconnection.cc
@@ -10,7 +10,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgconnection.cc,v 1.6 1999/05/30 15:17:56 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgconnection.cc,v 1.7 2000/03/16 15:34:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,7 +49,7 @@ PgConnection::PgConnection(const char* conninfo)
PgConnection::~PgConnection()
{
// Terminate the debugging output if it was turned on
- #if defined(DEBUG)
+ #if defined(DEBUGFILE)
PQuntrace(pgConn);
#endif
@@ -68,7 +68,7 @@ ConnStatusType PgConnection::Connect(const char* conninfo)
{
ConnStatusType cst;
// Turn the trace on
-#if defined(DEBUG)
+#if defined(DEBUGFILE)
FILE *debug = fopen("/tmp/trace.out","w");
PQtrace(pgConn, debug);
#endif