Commit 3e4708c4 authored by Bruce Momjian's avatar Bruce Momjian

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
parent 1f3122e2
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# IDENTIFICATION # 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 \ ...@@ -34,7 +34,7 @@ CXXFLAGS+= -I$(SRCDIR)/backend \
-I$(SRCHEADERDIR) \ -I$(SRCHEADERDIR) \
-I$(LIBPQDIR) -I$(LIBPQDIR)
#CXXFLAGS+= -DDEBUG #CXXFLAGS+= -DDEBUGFILE
ifdef KRBVERS ifdef KRBVERS
CXXFLAGS+= $(KRBFLAGS) CXXFLAGS+= $(KRBFLAGS)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * 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) ...@@ -49,7 +49,7 @@ PgConnection::PgConnection(const char* conninfo)
PgConnection::~PgConnection() PgConnection::~PgConnection()
{ {
// Terminate the debugging output if it was turned on // Terminate the debugging output if it was turned on
#if defined(DEBUG) #if defined(DEBUGFILE)
PQuntrace(pgConn); PQuntrace(pgConn);
#endif #endif
...@@ -68,7 +68,7 @@ ConnStatusType PgConnection::Connect(const char* conninfo) ...@@ -68,7 +68,7 @@ ConnStatusType PgConnection::Connect(const char* conninfo)
{ {
ConnStatusType cst; ConnStatusType cst;
// Turn the trace on // Turn the trace on
#if defined(DEBUG) #if defined(DEBUGFILE)
FILE *debug = fopen("/tmp/trace.out","w"); FILE *debug = fopen("/tmp/trace.out","w");
PQtrace(pgConn, debug); PQtrace(pgConn, debug);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment