Skip to content

Commit 8f0a76f

Browse files
author
Thomas G. Lockhart
committed
Bring debugging print statement declarations up to date.
Comment-out the #undef default declarations to allow the parameters to be set on the compiler command line.
1 parent 889c153 commit 8f0a76f

File tree

1 file changed

+29
-45
lines changed

1 file changed

+29
-45
lines changed

src/include/executor/execdebug.h

Lines changed: 29 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: execdebug.h,v 1.7 1999/02/13 23:21:22 momjian Exp $
9+
* $Id: execdebug.h,v 1.8 1999/02/23 07:39:40 thomas Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -19,7 +19,9 @@
1919
* debugging defines.
2020
*
2121
* If you want certain debugging behaviour, then #define
22-
* the variable to 1, else #undef it. -cim 10/26/89
22+
* the variable to 1. No need to explicitly #undef by default,
23+
* since we can use -D compiler options to enable features.
24+
* - thomas 1999-02-20
2325
* ----------------------------------------------------------------
2426
*/
2527

@@ -28,8 +30,8 @@
2830
* will print a message every time we call ExecStoreTuple.
2931
* -cim 3/20/91
3032
* ----------------
31-
*/
3233
#undef EXEC_DEBUGSTORETUP
34+
*/
3335

3436
/* ----------------
3537
* EXEC_TUPLECOUNT is a #define which causes the
@@ -38,23 +40,23 @@
3840
* you might want to undefine this if you are doing work
3941
* on the decs - cim 10/20/89
4042
* ----------------
41-
*/
4243
#undef EXEC_TUPLECOUNT
44+
*/
4345

4446
/* ----------------
4547
* EXEC_SHOWBUFSTATS controls whether or not buffer statistics
4648
* are shown for each query. -cim 2/9/89
4749
* ----------------
48-
*/
4950
#undef EXEC_SHOWBUFSTATS
51+
*/
5052

5153
/* ----------------
5254
* EXEC_CONTEXTDEBUG turns on the printing of debugging information
5355
* by CXT_printf() calls regarding which memory context is the
5456
* CurrentMemoryContext for palloc() calls.
5557
* ----------------
56-
*/
5758
#undef EXEC_CONTEXTDEBUG
59+
*/
5860

5961
/* ----------------
6062
* EXEC_RETURNSIZE is a compile flag governing the
@@ -72,57 +74,57 @@
7274
* the first few bytes of the data so again, it's
7375
* not likely to matter.
7476
* ----------------
75-
*/
7677
#undef EXEC_RETURNSIZE
78+
*/
7779

7880
/* ----------------
7981
* EXEC_UTILSDEBUG is a flag which turns on debugging of the
8082
* executor utilities by EU_printf() in eutils.c
8183
* ----------------
82-
*/
8384
#undef EXEC_UTILSDEBUG
85+
*/
8486

8587
/* ----------------
8688
* EXEC_NESTLOOPDEBUG is a flag which turns on debugging of the
8789
* nest loop node by NL_printf() and ENL_printf() in nestloop.c
8890
* ----------------
89-
*/
9091
#undef EXEC_NESTLOOPDEBUG
92+
*/
9193

9294
/* ----------------
9395
* EXEC_PROCDEBUG is a flag which turns on debugging of
9496
* ExecProcNode() by PN_printf() in procnode.c
9597
* ----------------
96-
*/
9798
#undef EXEC_PROCDEBUG
99+
*/
98100

99101
/* ----------------
100102
* EXEC_EVALDEBUG is a flag which turns on debugging of
101103
* ExecEval and ExecTargetList() stuff by EV_printf() in qual.c
102104
* ----------------
103-
*/
104105
#undef EXEC_EVALDEBUG
106+
*/
105107

106108
/* ----------------
107109
* EXEC_SCANDEBUG is a flag which turns on debugging of
108110
* the ExecSeqScan() stuff by S_printf() in seqscan.c
109111
* ----------------
110-
*/
111112
#undef EXEC_SCANDEBUG
113+
*/
112114

113115
/* ----------------
114116
* EXEC_SORTDEBUG is a flag which turns on debugging of
115117
* the ExecSort() stuff by SO_printf() in sort.c
116118
* ----------------
117-
*/
118119
#undef EXEC_SORTDEBUG
120+
*/
119121

120122
/* ----------------
121123
* EXEC_MERGEJOINDEBUG is a flag which turns on debugging of
122124
* the ExecMergeJoin() stuff by MJ_printf() in mergejoin.c
123125
* ----------------
124-
*/
125126
#undef EXEC_MERGEJOINDEBUG
127+
*/
126128

127129
/* ----------------
128130
* EXEC_MERGEJOINPFREE is a flag which causes merge joins
@@ -131,16 +133,16 @@
131133
* at the cost of doing deallocation of stuff only at the
132134
* end of the transaction
133135
* ----------------
134-
*/
135136
#undef EXEC_MERGEJOINPFREE
137+
*/
136138

137139
/* ----------------
138140
* EXEC_DEBUGINTERACTIVE is a flag which enables the
139141
* user to issue "DEBUG" commands from an interactive
140142
* backend.
141143
* ----------------
142-
*/
143144
#undef EXEC_DEBUGINTERACTIVE
145+
*/
144146

145147
/* ----------------
146148
* EXEC_DEBUGVARIABLEFILE is string, which if defined will
@@ -155,8 +157,8 @@
155157
* they can't affect the first query.. this hack should be
156158
* replaced by something better sometime. -cim 11/2/89
157159
* ----------------
158-
*/
159160
#undef EXEC_DEBUGVARIABLEFILE
161+
*/
160162

161163
/* ----------------------------------------------------------------
162164
* #defines controlled by above definitions
@@ -221,7 +223,7 @@ extern int NIndexTupleInserted;
221223
* ----------------
222224
*/
223225
#ifdef EXEC_UTILSDEBUG
224-
#define EU_nodeDisplay(l) nodeDisplay(l, 0)
226+
#define EU_nodeDisplay(l) nodeDisplay(l)
225227
#define EU_printf(s) printf(s)
226228
#define EU1_printf(s, a) printf(s, a)
227229
#define EU2_printf(s, a) printf(s, a, b)
@@ -242,7 +244,7 @@ extern int NIndexTupleInserted;
242244
* ----------------
243245
*/
244246
#ifdef EXEC_NESTLOOPDEBUG
245-
#define NL_nodeDisplay(l) nodeDisplay(l, 0)
247+
#define NL_nodeDisplay(l) nodeDisplay(l)
246248
#define NL_printf(s) printf(s)
247249
#define NL1_printf(s, a) printf(s, a)
248250
#define NL4_printf(s, a, b, c, d) printf(s, a, b, c, d)
@@ -272,7 +274,7 @@ extern int NIndexTupleInserted;
272274
* ----------------
273275
*/
274276
#ifdef EXEC_EVALDEBUG
275-
#define EV_nodeDisplay(l) nodeDisplay(l, 0)
277+
#define EV_nodeDisplay(l) nodeDisplay(l)
276278
#define EV_printf(s) printf(s)
277279
#define EV1_printf(s, a) printf(s, a)
278280
#define EV5_printf(s, a, b, c, d, e) printf(s, a, b, c, d, e)
@@ -288,7 +290,7 @@ extern int NIndexTupleInserted;
288290
* ----------------
289291
*/
290292
#ifdef EXEC_SCANDEBUG
291-
#define S_nodeDisplay(l) nodeDisplay(l, 0)
293+
#define S_nodeDisplay(l) nodeDisplay(l)
292294
#define S_printf(s) printf(s)
293295
#define S1_printf(s, p) printf(s, p)
294296
#else
@@ -302,7 +304,7 @@ extern int NIndexTupleInserted;
302304
* ----------------
303305
*/
304306
#ifdef EXEC_SORTDEBUG
305-
#define SO_nodeDisplay(l) nodeDisplay(l, 0)
307+
#define SO_nodeDisplay(l) nodeDisplay(l)
306308
#define SO_printf(s) printf(s)
307309
#define SO1_printf(s, p) printf(s, p)
308310
#else
@@ -316,11 +318,14 @@ extern int NIndexTupleInserted;
316318
* ----------------
317319
*/
318320
#ifdef EXEC_MERGEJOINDEBUG
319-
#define MJ_nodeDisplay(l) nodeDisplay(l, 0)
321+
322+
#include "nodes/print.h"
323+
324+
#define MJ_nodeDisplay(l) nodeDisplay(l)
320325
#define MJ_printf(s) printf(s)
321326
#define MJ1_printf(s, p) printf(s, p)
322327
#define MJ2_printf(s, p1, p2) printf(s, p1, p2)
323-
#define MJ_debugtup(tuple, type) debugtup(tuple, type)
328+
#define MJ_debugtup(tuple, type) debugtup(tuple, type, NULL)
324329
#define MJ_dump(context, state) ExecMergeTupleDump(econtext, state)
325330
#define MJ_DEBUG_QUAL(clause, res) \
326331
MJ2_printf(" ExecQual(%s, econtext) returns %s\n", \
@@ -349,27 +354,6 @@ extern int NIndexTupleInserted;
349354
* DO NOT DEFINE THESE EVER OR YOU WILL BURN!
350355
* ----------------------------------------------------------------
351356
*/
352-
/* ----------------
353-
* DOESNOTWORK is currently placed around memory manager
354-
* code that is known to cause problems. Code in between
355-
* is likely not converted and probably won't work anyways.
356-
* ----------------
357-
*/
358-
#undef DOESNOTWORK
359-
360-
/* ----------------
361-
* PERHAPSNEVER is placed around the "scan attribute"
362-
* support code for the rule manager because for now we
363-
* do things inefficiently. The correct solution to our
364-
* problem is to add code to the parser/planner to save
365-
* attribute information for the rule manager rather than
366-
* have the executor have to grope through the entire plan
367-
* for it so if we ever decide to make things better,
368-
* we should probably delete the stuff in between PERHAPSNEVER..
369-
* ----------------
370-
*/
371-
#undef PERHAPSNEVER
372-
373357
/* ----------------
374358
* NOTYET is placed around any code not yet implemented
375359
* in the executor. Only remove these when actually implementing

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy