mirror of
https://github.com/postgres/postgres.git
synced 2026-04-26 00:31:07 -04:00
useless substructure for its RangeTblEntry nodes. (I chose to keep using the same struct node type and just zero out the link fields for unneeded info, rather than making a separate ExecRangeTblEntry type --- it seemed too fragile to have two different rangetable representations.) Along the way, put subplans into a list in the toplevel PlannedStmt node, and have SubPlan nodes refer to them by list index instead of direct pointers. Vadim wanted to do that years ago, but I never understood what he was on about until now. It makes things a *whole* lot more robust, because we can stop worrying about duplicate processing of subplans during expression tree traversals. That's been a constant source of bugs, and it's finally gone. There are some consequent simplifications yet to be made, like not using a separate EState for subplans in the executor, but I'll tackle that later.
35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* print.h
|
|
* definitions for nodes/print.c
|
|
*
|
|
*
|
|
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $PostgreSQL: pgsql/src/include/nodes/print.h,v 1.27 2007/02/22 22:00:25 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef PRINT_H
|
|
#define PRINT_H
|
|
|
|
#include "nodes/parsenodes.h"
|
|
#include "nodes/execnodes.h"
|
|
|
|
|
|
#define nodeDisplay(x) pprint(x)
|
|
|
|
extern void print(void *obj);
|
|
extern void pprint(void *obj);
|
|
extern void elog_node_display(int lev, const char *title,
|
|
void *obj, bool pretty);
|
|
extern char *format_node_dump(const char *dump);
|
|
extern char *pretty_format_node_dump(const char *dump);
|
|
extern void print_rt(List *rtable);
|
|
extern void print_expr(Node *expr, List *rtable);
|
|
extern void print_pathkeys(List *pathkeys, List *rtable);
|
|
extern void print_tl(List *tlist, List *rtable);
|
|
extern void print_slot(TupleTableSlot *slot);
|
|
|
|
#endif /* PRINT_H */
|