33 * execdebug.h
44 * #defines governing debugging behaviour in the executor
55 *
6+ * XXX this is all pretty old and crufty. Newer code tends to use elog()
7+ * for debug printouts, because that's more flexible than printf().
8+ *
69 *
710 * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
811 * Portions Copyright (c) 1994, Regents of the University of California
912 *
10- * $PostgreSQL: pgsql/src/include/executor/execdebug.h,v 1.29 2006/03/05 15:58:56 momjian Exp $
13+ * $PostgreSQL: pgsql/src/include/executor/execdebug.h,v 1.30 2006/05/23 15:21:52 tgl Exp $
1114 *
1215 *-------------------------------------------------------------------------
1316 */
2932
3033/* ----------------
3134 *EXEC_TUPLECOUNT is a #define which causes the
32- *executor keep track of tuple counts. This might be
35+ *executorto keep track of tuple counts. This might be
3336 *causing some problems with the decstation stuff so
3437 *you might want to undefine this if you are doing work
3538 *on the decs - cim 10/20/89
3639 * ----------------
3740#undef EXEC_TUPLECOUNT
3841 */
3942
40- /* ----------------
41- *EXEC_CONTEXTDEBUG turns on the printing of debugging information
42- *by CXT_printf() calls regarding which memory context is the
43- *CurrentMemoryContext for palloc() calls.
44- * ----------------
45- #undef EXEC_CONTEXTDEBUG
46- */
47-
48- /* ----------------
49- *EXEC_UTILSDEBUG is a flag which turns on debugging of the
50- *executor utilities by EU_printf() in eutils.c
51- * ----------------
52- #undef EXEC_UTILSDEBUG
53- */
54-
5543/* ----------------
5644 *EXEC_NESTLOOPDEBUG is a flag which turns on debugging of the
57- *nest loop node by NL_printf() and ENL_printf() innestloop .c
45+ *nest loop node by NL_printf() and ENL_printf() innodeNestloop .c
5846 * ----------------
5947#undef EXEC_NESTLOOPDEBUG
6048 */
6149
62- /* ----------------
63- *EXEC_PROCDEBUG is a flag which turns on debugging of
64- *ExecProcNode() by PN_printf() in procnode.c
65- * ----------------
66- #undef EXEC_PROCDEBUG
67- */
68-
6950/* ----------------
7051 *EXEC_EVALDEBUG is a flag which turns on debugging of
71- *ExecEval and ExecTargetList() stuff by EV_printf() inqual .c
52+ *ExecEval and ExecTargetList() stuff by EV_printf() inexecQual .c
7253 * ----------------
7354#undef EXEC_EVALDEBUG
7455 */
7556
76- /* ----------------
77- *EXEC_SCANDEBUG is a flag which turns on debugging of
78- *the ExecSeqScan() stuff by S_printf() in seqscan.c
79- * ----------------
80- #undef EXEC_SCANDEBUG
81- */
82-
8357/* ----------------
8458 *EXEC_SORTDEBUG is a flag which turns on debugging of
85- *the ExecSort() stuff by SO_printf() insort .c
59+ *the ExecSort() stuff by SO_printf() innodeSort .c
8660 * ----------------
8761#undef EXEC_SORTDEBUG
8862 */
8963
9064/* ----------------
9165 *EXEC_MERGEJOINDEBUG is a flag which turns on debugging of
92- *the ExecMergeJoin() stuff by MJ_printf() inmergejoin .c
66+ *the ExecMergeJoin() stuff by MJ_printf() innodeMergejoin .c
9367 * ----------------
9468#undef EXEC_MERGEJOINDEBUG
9569 */
@@ -139,39 +113,6 @@ extern intNIndexTupleInserted;
139113#define IncrIndexInserted ()(void)(0)
140114#endif /* EXEC_TUPLECOUNT */
141115
142- /* ----------------
143- *memory context debugging defines
144- * ----------------
145- */
146- #ifdef EXEC_CONTEXTDEBUG
147- #define CXT_printf (s )printf(s)
148- #define CXT1_printf (s ,a )printf(s, a)
149- #else
150- #define CXT_printf (s )
151- #define CXT1_printf (s ,a )
152- #endif /* EXEC_CONTEXTDEBUG */
153-
154- /* ----------------
155- *eutils debugging defines
156- * ----------------
157- */
158- #ifdef EXEC_UTILSDEBUG
159- #define EU_nodeDisplay (l )nodeDisplay(l)
160- #define EU_printf (s )printf(s)
161- #define EU1_printf (s ,a )printf(s, a)
162- #define EU2_printf (s ,a ,b )printf(s, a, b)
163- #define EU3_printf (s ,a ,b ,c )printf(s, a, b, c)
164- #define EU4_printf (s ,a ,b ,c ,d )printf(s, a, b, c, d)
165- #else
166- #define EU_nodeDisplay (l )
167- #define EU_printf (s )
168- #define EU1_printf (s ,a )
169- #define EU2_printf (s ,a ,b )
170- #define EU3_printf (s ,a ,b ,c )
171- #define EU4_printf (s ,a ,b ,c ,d )
172- #endif /* EXEC_UTILSDEBUG */
173-
174-
175116/* ----------------
176117 *nest loop debugging defines
177118 * ----------------
@@ -180,28 +121,14 @@ extern intNIndexTupleInserted;
180121#define NL_nodeDisplay (l )nodeDisplay(l)
181122#define NL_printf (s )printf(s)
182123#define NL1_printf (s ,a )printf(s, a)
183- #define NL4_printf (s ,a ,b ,c ,d )printf(s, a, b, c, d)
184124#define ENL1_printf (message )printf("ExecNestLoop: %s\n", message)
185125#else
186126#define NL_nodeDisplay (l )
187127#define NL_printf (s )
188128#define NL1_printf (s ,a )
189- #define NL4_printf (s ,a ,b ,c ,d )
190129#define ENL1_printf (message )
191130#endif /* EXEC_NESTLOOPDEBUG */
192131
193- /* ----------------
194- *proc node debugging defines
195- * ----------------
196- */
197- #ifdef EXEC_PROCDEBUG
198- #define PN_printf (s )printf(s)
199- #define PN1_printf (s ,p )printf(s, p)
200- #else
201- #define PN_printf (s )
202- #define PN1_printf (s ,p )
203- #endif /* EXEC_PROCDEBUG */
204-
205132/* ----------------
206133 *exec eval / target list debugging defines
207134 * ----------------
@@ -210,28 +137,12 @@ extern intNIndexTupleInserted;
210137#define EV_nodeDisplay (l )nodeDisplay(l)
211138#define EV_printf (s )printf(s)
212139#define EV1_printf (s ,a )printf(s, a)
213- #define EV5_printf (s ,a ,b ,c ,d ,e )printf(s, a, b, c, d, e)
214140#else
215141#define EV_nodeDisplay (l )
216142#define EV_printf (s )
217143#define EV1_printf (s ,a )
218- #define EV5_printf (s ,a ,b ,c ,d ,e )
219144#endif /* EXEC_EVALDEBUG */
220145
221- /* ----------------
222- *scan debugging defines
223- * ----------------
224- */
225- #ifdef EXEC_SCANDEBUG
226- #define S_nodeDisplay (l )nodeDisplay(l)
227- #define S_printf (s )printf(s)
228- #define S1_printf (s ,p )printf(s, p)
229- #else
230- #define S_nodeDisplay (l )
231- #define S_printf (s )
232- #define S1_printf (s ,p )
233- #endif /* EXEC_SCANDEBUG */
234-
235146/* ----------------
236147 *sort node debugging defines
237148 * ----------------