head	1.48;
access;
symbols
	release_4_2:1.48
	aix_ok:1.48
	Version_2_1:1.27
	Version_2:1.19
	C_Demo_1:1.9
	Retrieve_x_1:1.2;
locks; strict;
comment	@ * @;


1.48
date	93.09.26.00.14.35;	author paxson;	state Exp;
branches;
next	1.47;

1.47
date	93.04.14.01.10.27;	author sunita;	state Exp;
branches;
next	1.46;

1.46
date	92.11.11.04.18.15;	author marc;	state Exp;
branches;
next	1.45;

1.45
date	92.07.26.17.04.43;	author mer;	state Exp;
branches;
next	1.44;

1.44
date	92.07.08.20.45.34;	author joey;	state Exp;
branches;
next	1.43;

1.43
date	92.07.06.22.24.33;	author mao;	state Exp;
branches;
next	1.42;

1.42
date	92.07.06.22.23.16;	author mao;	state Exp;
branches;
next	1.41;

1.41
date	92.07.04.04.03.58;	author mao;	state Exp;
branches;
next	1.40;

1.40
date	92.06.29.23.40.16;	author joey;	state Exp;
branches;
next	1.39;

1.39
date	92.06.28.15.45.43;	author mer;	state Exp;
branches;
next	1.38;

1.38
date	92.06.27.18.48.06;	author mao;	state Exp;
branches;
next	1.37;

1.37
date	92.06.26.17.52.13;	author mer;	state Exp;
branches;
next	1.36;

1.36
date	92.06.25.19.30.18;	author mer;	state Exp;
branches;
next	1.35;

1.35
date	92.06.25.06.24.20;	author joey;	state Exp;
branches;
next	1.34;

1.34
date	92.03.31.23.15.55;	author mer;	state Exp;
branches;
next	1.33;

1.33
date	91.11.07.20.14.45;	author glass;	state Exp;
branches;
next	1.32;

1.32
date	91.10.01.16.39.28;	author glass;	state Exp;
branches;
next	1.31;

1.31
date	91.06.18.23.28.17;	author cimarron;	state Exp;
branches;
next	1.30;

1.30
date	91.03.28.22.28.42;	author kemnitz;	state Exp;
branches;
next	1.29;

1.29
date	91.03.27.13.22.49;	author choi;	state Exp;
branches;
next	1.28;

1.28
date	91.03.27.12.32.12;	author choi;	state Exp;
branches;
next	1.27;

1.27
date	91.02.05.15.45.24;	author sp;	state Exp;
branches;
next	1.26;

1.26
date	91.01.19.14.40.19;	author sp;	state Exp;
branches;
next	1.25;

1.25
date	90.12.27.19.18.49;	author sp;	state Exp;
branches;
next	1.24;

1.24
date	90.11.12.11.28.23;	author kemnitz;	state Exp;
branches;
next	1.23;

1.23
date	90.10.10.18.50.49;	author hong;	state Exp;
branches;
next	1.22;

1.22
date	90.08.18.00.40.28;	author cimarron;	state Exp;
branches;
next	1.21;

1.21
date	90.08.17.08.52.40;	author cimarron;	state Exp;
branches;
next	1.20;

1.20
date	90.08.08.08.17.36;	author cimarron;	state Exp;
branches;
next	1.19;

1.19
date	90.05.31.11.08.23;	author cimarron;	state Version_2;
branches;
next	1.18;

1.18
date	90.05.25.13.11.47;	author cimarron;	state Exp;
branches;
next	1.17;

1.17
date	90.05.25.12.13.06;	author kemnitz;	state Exp;
branches;
next	1.16;

1.16
date	90.05.17.23.11.41;	author kemnitz;	state Exp;
branches;
next	1.15;

1.15
date	90.03.31.18.57.52;	author cimarron;	state Exp;
branches;
next	1.14;

1.14
date	90.03.13.20.58.54;	author cimarron;	state Exp;
branches;
next	1.13;

1.13
date	90.03.12.07.17.32;	author kemnitz;	state Exp;
branches;
next	1.12;

1.12
date	90.01.04.17.17.33;	author sp;	state Exp;
branches;
next	1.11;

1.11
date	89.11.02.18.05.54;	author cimarron;	state Exp;
branches;
next	1.10;

1.10
date	89.10.13.01.16.17;	author sp;	state Exp;
branches;
next	1.9;

1.9
date	89.09.05.17.10.48;	author mao;	state C_Demo_1;
branches;
next	1.8;

1.8
date	89.08.24.21.24.16;	author cimarron;	state Exp;
branches;
next	1.7;

1.7
date	89.08.24.18.38.43;	author cimarron;	state Exp;
branches;
next	1.6;

1.6
date	89.08.24.17.54.05;	author cimarron;	state Exp;
branches;
next	1.5;

1.5
date	89.08.24.17.50.21;	author cimarron;	state Exp;
branches;
next	1.4;

1.4
date	89.08.24.17.46.08;	author cimarron;	state Exp;
branches;
next	1.3;

1.3
date	89.08.09.17.52.11;	author cimarron;	state Exp;
branches;
next	1.2;

1.2
date	89.08.01.16.17.46;	author goh;	state Exp;
branches;
next	1.1;

1.1
date	89.07.20.09.28.10;	author goh;	state Exp;
branches;
next	;


desc
@@


1.48
log
@added field to const node - constisset
@
text
@/* ----------------------------------------------------------------
 *   FILE
 *	primnodes.h
 *	
 *   DESCRIPTION
 *	Definitions for parse tree/query tree ("primitive") nodes.
 *
 *   NOTES
 *	this file is listed in lib/Gen/inherits.sh and in the
 *	INH_SRC list in conf/inh.mk and is used to generate the
 *	obj/lib/C/primnodes.c file
 *
 *	For explanations of what the structure members mean,
 *	see ~postgres/doc/query-tree.t.
 *
 *   IDENTIFICATION
 *	$Header: /local/src/postgres/src/backend/nodes/RCS/primnodes.h,v 1.47 1993/04/14 01:10:27 sunita Exp paxson $
 * ----------------------------------------------------------------
 */

#ifndef PrimNodesIncluded
#define	PrimNodesIncluded

#include "tmp/postgres.h"

#include "access/att.h"
#include "access/attnum.h"
#include "storage/buf.h"
#include "utils/rel.h"
#include "utils/fcache.h"
#include "rules/params.h"

#include "nodes/nodes.h"	/* bogus inheritance system */
#include "nodes/pg_lisp.h"
#include "primnodes.gen"

/* ----------------------------------------------------------------
 *	Node Function Declarations
 *	
 *  All of these #defines indicate that we have written print/equal/copy
 *  support for the classes named.  The print routines are in
 *  lib/C/printfuncs.c, the equal functions are in lib/C/equalfincs.c and
 *  the copy functions can be found in lib/C/copyfuncs.c
 *
 *  An interface routine is generated automatically by Gen_creator.sh for
 *  each node type.  This routine will call either do nothing or call
 *  an _print, _equal or _copy function defined in one of the above
 *  files, depending on whether or not the appropriate #define is specified.
 *
 *  Thus, when adding a new node type, you have to add a set of
 *  _print, _equal and _copy functions to the above files and then
 *  add some #defines below.
 *
 *  This is pretty complicated, and a better-designed system needs to be
 *  implemented.
 * ----------------------------------------------------------------
 */

/* ----------------
 *	Node Out Function declarations
 * ----------------
 */
#define	OutResdomExists
#define	OutExprExists
#define	OutParamExists
#define	OutFuncExists
#define	OutOperExists
#define OutConstExists
#define OutVarExists
#define OutArrayExists
#define OutArrayRefExists
#define OutFjoinExists

/* ----------------
 *	Node Equal Function declarations
 * ----------------
 */
#define	EqualResdomExists
#define	EqualExprExists
#define	EqualParamExists
#define	EqualFuncExists
#define	EqualOperExists
#define EqualConstExists
#define EqualVarExists
#define EqualArrayExists
#define EqualArrayRefExists
#define EqualFjoinExists

/* ----------------
 *	Node Copy Function declarations
 * ----------------
 */
#define	CopyResdomExists
#define	CopyExprExists
#define	CopyParamExists
#define	CopyFuncExists
#define	CopyOperExists
#define CopyConstExists
#define CopyVarExists
#define CopyArrayExists
#define CopyArrayRefExists
#define CopyFjoinExists


/* ----------------------------------------------------------------
 *			node definitions
 * ----------------------------------------------------------------
 */

/* ----------------
 * Resdom
 *	resno		- XXX comment me.
 *	restype		- XXX comment me.
 *      rescomplex      - is the restype complex?
 *	reslen		- XXX comment me.
 *	resname		- XXX comment me.
 *	reskey		- XXX comment me.
 *	reskeyop	- XXX comment me.
 *	resjunk		- set to nonzero to eliminate the attribute
 *			  from final target list  e.g., ctid for replace
 *			  and delete
 *
 *	XXX reskeyop is USED as an int within the print functions
 *	    so that's what the copy function uses so if its
 *	    in fact an int, then the OperatorTupleForm declaration
 *	    below is incorrect.  -cim 5/1/90
 * ----------------
 */
class (Resdom) public (Node) {
 /* private: */
	inherits0(Node);
	AttributeNumber		resno;
	ObjectId		restype;
	bool                    rescomplex;
	Size			reslen;
	Name			resname;
	Index			reskey;
	OperatorTupleForm	reskeyop; 
	int			resjunk;
 /* public: */
};

/* -------------
 * Fjoin
 *      initialized	- true if the Fjoin has already been initialized for
 *                        the current target list evaluation
 *	nNodes		- The number of Iter nodes returning sets that the
 *			  node will flatten
 *	outerList	- 1 or more Iter nodes
 *	inner		- exactly one Iter node.  We eval every node in the
 *			  outerList once then eval the inner node to completion
 *			  pair the outerList result vector with each inner
 *			  result to form the full result.  When the inner has
 *			  been exhausted, we get the next outer result vector
 *			  and reset the inner.
 *	results		- The complete (flattened) result vector
 *      alwaysNull	- a null vector to indicate sets with a cardinality of
 *			  0, we treat them as the set {NULL}.
 */
class (Fjoin) public (Node) {
	inherits0(Node);
	bool			fj_initialized;
	int			fj_nNodes;
	List			fj_innerNode;
	DatumPtr		fj_results;
	BoolPtr			fj_alwaysDone;
};

/* ----------------
 * Expr
 * ----------------
 */
class (Expr) public (Node) {
#define	ExprDefs \
	inherits0(Node)
 /* private: */
	ExprDefs;
 /* public: */
};

/* ----------------
 * Var
 *	varno 		- index of this var's relation in the range table
 *	varattno 	- attribute number of this var
 *	vartype 	- pg_type tuple oid for the type of this var
 *	varid 		- cons cell containing (varno, (varattno))
 *	varslot 	- cached pointer to addr of expr cxt slot
 * ----------------
 */
class (Var) public (Expr) {
 /* private: */
	inherits1(Expr);
	Index			varno; 
	AttributeNumber		varattno;
	ObjectId		vartype;
	List			varid;
	Pointer			varslot;
 /* public: */
};

/* ----------------
 * Oper
 *	opno 		- PG_OPERATOR OID of the operator
 *	opid 		- PG_PROC OID for the operator
 *	oprelationlevel - true iff the operator is relation-level
 *	opresulttype 	- PG_TYPE OID of the operator's return value
 *	opsize 		- size of return result (cached by executor)
 *	op_fcache	- XXX comment me.
 *
 * ----
 * NOTE: in the good old days 'opno' used to be both (or either, or
 * neither) the pg_operator oid, and/or the pg_proc oid depending 
 * on the postgres module in question (parser->pg_operator,
 * executor->pg_proc, planner->both), the mood of the programmer,
 * and the phase of the moon (rumors that it was also depending on the day
 * of the week are probably false). To make things even more postgres-like
 * (i.e. a mess) some comments were referring to 'opno' using the name
 * 'opid'. Anyway, now we have two separate fields, and of course that
 * immediately removes all bugs from the code...	[ sp :-) ].
 * ----------------
 */
class (Oper) public (Expr) {
 /* private: */
	inherits1(Expr);
	ObjectId		opno;
	ObjectId		opid;
	bool			oprelationlevel;
	ObjectId		opresulttype;
	int			opsize;
	FunctionCachePtr	op_fcache;
 /* public: */
};


/* ----------------
 * Const
 *	consttype - PG_TYPE OID of the constant's value
 *	constlen - length in bytes of the constant's value
 *	constvalue - the constant's value
 *	constisnull - whether the constant is null 
 *		(if true, the other fields are undefined)
 *	constbyval - whether the information in constvalue
 *		if passed by value.  If true, then all the information
 *		is stored in the datum. If false, then the datum
 *		contains a pointer to the information.
 *      constisset - whether the const represents a set.  The const
 *              value corresponding will be the query that defines
 *              the set.
 * ----------------
 */
class (Const) public (Expr) {
 /* private: */
	inherits1(Expr);
	ObjectId		consttype;
	Size			constlen;
	Datum			constvalue;
	bool			constisnull;
	bool			constbyval;
	bool                    constisset;
 /* public: */
};

/* ----------------
 * Param
 *	paramkind - specifies the kind of parameter. The possible values
 *	for this field are specified in "params.h", and they are:
 *
 * 	PARAM_NAMED: The parameter has a name, i.e. something
 *              like `$.salary' or `$.foobar'.
 *              In this case field `paramname' must be a valid Name.
 *
 *	PARAM_NUM:   The parameter has only a numeric identifier,
 *              i.e. something like `$1', `$2' etc.
 *              The number is contained in the `paramid' field.
 *
 * 	PARAM_NEW:   Used in PRS2 rule, similar to PARAM_NAMED.
 * 	             The `paramname' and `paramid' refer to the "NEW" tuple
 *		     The `pramname' is the attribute name and `paramid'
 *	    	     is the attribute number.
 *
 *	PARAM_OLD:   Same as PARAM_NEW, but in this case we refer to
 *              the "OLD" tuple.
 *
 *	paramid - numeric identifier for literal-constant parameters ("$1")
 *	paramname - attribute name for tuple-substitution parameters ("$.foo")
 *	paramtype - PG_TYPE OID of the parameter's value
 *      param_tlist - allows for projection in a param node.
 * ----------------
 */
class (Param) public (Expr) {
 /* private: */
	inherits1(Expr);
	int			paramkind;
	AttributeNumber		paramid;
	Name			paramname;
	ObjectId		paramtype;
	List                    param_tlist;
 /* public: */
};


/* ----------------
 * Func
 *	funcid 		- PG_FUNCTION OID of the function
 *	functype 	- PG_TYPE OID of the function's return value
 *	funcisindex 	- the function can be evaluated by scanning an index
 *			  (set during query optimization)
 *	funcsize 	- size of return result (cached by executor)
 *	func_fcache 	- runtime state while running this function.  Where
 *                        we are in the execution of the function if it
 *                        returns more than one value, etc.
 *                        See utils/fcache.h
 *      func_tlist      - projection of functions returning tuples
 *      func_planlist   - result of planning this func, if it's a PQ func
 * ----------------
 */
class (Func) public (Expr) {
 /* private: */
	inherits1(Expr);
	ObjectId		funcid;
	ObjectId		functype;
	bool			funcisindex;
	int			funcsize;
	FunctionCachePtr	func_fcache;
	List                    func_tlist;
	List                    func_planlist;
 /* public: */
};

/* ----------------
 * Array
 *	arrayelemtype	- base type of the array's elements (homogenous!)
 *	arrayelemlength	- length of that type
 *	arrayelembyval	- can you pass this element by value?
 *	arrayndim   - number of dimensions of the array
 *	arraylow	- base for array indexing
 *	arrayhigh	- limit for array indexing
 *	arraylen	-
 * ----------------
 *
 *  memo from mao:  the array support we inherited from 3.1 is just
 *  wrong.  when time exists, we should redesign this stuff to get
 *  around a bunch of unfortunate implementation decisions made there.
 */
class (Array) public (Expr) {
 /* private: */
	inherits1(Expr);
	ObjectId		arrayelemtype;
	int				arrayelemlength;
	bool			arrayelembyval;
	int 			arrayndim;
	IntArray		arraylow;
	IntArray		arrayhigh;
	int				arraylen;
 /* public: */
};

/* ----------------
 *  ArrayRef:
 *	refelemtype	- type of the element referenced here
 *	refelemlength	- length of that type
 *	refelembyval	- can you pass this element type by value?
 *	refupperindexpr	- expressions that evaluate to upper array index
 *	reflowerexpr- the expressions that evaluate to a lower array index
 *	refexpr		- the expression that evaluates to an array
 *	refassignexpr- the expression that evaluates to the new value 
 *  to be assigned to the array in case of replace.
 * ----------------
 */
class (ArrayRef) public (Expr) {
 /* private: */
	inherits1(Expr);
	int			refattrlength;
	int			refelemlength;
	ObjectId		refelemtype;
	bool			refelembyval;
	LispValue		refupperindexpr;
	LispValue		reflowerindexpr;
	LispValue		refexpr;
	LispValue		refassgnexpr;
};
#endif /* PrimNodesIncluded */
@


1.47
log
@extended array node definition to understand multidimensional arrays.
@
text
@d17 1
a17 1
 *	$Header: /usr/local/devel/postgres/src/backend/nodes/RCS/primnodes.h,v 1.46 1992/11/11 04:18:15 marc Exp $
d246 3
d259 1
d309 4
a312 1
 *	func_fcache 	- XXX comment me.
@


1.46
log
@headers moved
@
text
@d17 1
a17 1
 *	$Header: /usr/local/dev/postgres/newtree/src/backend/nodes/RCS/primnodes.h,v 1.45 1992/07/26 17:04:43 mer Exp marc $
d328 1
d331 1
a331 1
 *	arraylen	- ((high - low) + 1) * elemlength, or -1
d342 1
a342 1
	int			arrayelemlength;
d344 4
a347 3
	int			arraylow;
	int			arrayhigh;
	int			arraylen;
d356 2
a357 1
 *	refindexpr	- expression that evaluates to array index
d359 2
d370 2
a371 1
	LispValue		refindexpr;
d373 1
@


1.45
log
@add total length of array (if known) to handle arrays not coming
from array_in
@
text
@d17 1
a17 1
 *	$Header: /private/mer/pg/src/lib/H/nodes/RCS/primnodes.h,v 1.44 1992/07/08 20:45:34 joey Exp mer $
d35 1
a35 1
#include "nodes/primnodes.gen"
@


1.44
log
@Fix for resdom->rescomplex, func->func_planlist
@
text
@d17 1
a17 1
 *	$Header: /private/joey/pg/src/lib/H/nodes/RCS/primnodes.h,v 1.43 1992/07/06 22:24:33 mao Exp joey $
d361 2
a363 1
	int			refelemlength;
@


1.43
log
@fix comment
@
text
@d17 1
a17 1
 *	$Header: /private/mao/postgres/src/lib/H/nodes/RCS/primnodes.h,v 1.42 1992/07/06 22:23:16 mao Exp mao $
d114 1
d134 1
d307 1
d319 1
@


1.42
log
@ArrayRef nodes now allow arbitrary expressions as array indices,
rather than just integer constants.
@
text
@d17 1
a17 1
 *	$Header: /private/mao/postgres/src/lib/H/nodes/RCS/primnodes.h,v 1.41 1992/07/04 04:03:58 mao Exp mao $
d350 1
a350 1
 *	refindex	- index into array
@


1.41
log
@fixes for arrays, array refs, and nested dots
@
text
@d17 1
a17 1
 *	$Header: /private/mao/postgres/src/lib/H/nodes/RCS/primnodes.h,v 1.40 1992/06/29 23:40:16 joey Exp mao $
d360 1
a360 1
	int			refindex;
@


1.40
log
@added param_tlist to Param
@
text
@d17 1
a17 1
 *	$Header: /private/joey/pg/src/lib/H/nodes/RCS/primnodes.h,v 1.39 1992/06/28 15:45:43 mer Exp joey $
d71 1
d86 1
d101 1
a183 2
 *	vardotfields 	- always nil (don't know why --mao 6/92)
 *	vararraylist 	- XXX comment me.
a193 2
	List			vardotfields;
	List			vararraylist;
d321 6
a326 6
 *	arrayelemtype	- XXX comment me.
 *	arrayelemlength	- XXX comment me.
 *	arrayelembyval	- XXX comment me.
 *	arraylow	- XXX comment me.
 *	arrayhigh	- XXX comment me.
 *	arraylen	- XXX comment me.
d328 4
d343 19
@


1.39
log
@do the #defines for Fjoin out equal and copy functions
@
text
@d17 1
a17 1
 *	$Header: /private/mer/pg/src/lib/H/nodes/RCS/primnodes.h,v 1.38 1992/06/27 18:48:06 mao Exp mer $
d282 1
d292 1
@


1.38
log
@describe varnode fields.
@
text
@d17 1
a17 1
 *	$Header: /private/mao/postgres/src/lib/H/nodes/RCS/primnodes.h,v 1.37 1992/06/26 17:52:13 mer Exp mao $
d71 1
d85 1
d99 1
@


1.37
log
@add fields to the Fjoin struct and name them more appropriately
@
text
@d17 1
a17 1
 *	$Header: /private/mer/pg/src/lib/H/nodes/RCS/primnodes.h,v 1.36 1992/06/25 19:30:18 mer Exp mer $
d175 4
a178 4
 *	varno 		- XXX comment me.
 *	varattno 	- XXX comment me.
 *	vartype 	- XXX comment me.
 *	vardotfields 	- XXX comment me.
d180 1
a180 1
 *	varid 		- XXX comment me.
@


1.36
log
@add the Fjoin node to flatten sets
@
text
@d17 1
a17 1
 *	$Header: /private/mer/pg/src/lib/H/nodes/RCS/primnodes.h,v 1.35 1992/06/25 06:24:20 joey Exp mer $
d137 2
d149 2
d154 5
a158 3
	int			nNodes;
	List			innerNode;
	DatumPtr		results;
@


1.35
log
@add tlist attribute to Func nodes, to support flattening
@
text
@d17 1
a17 1
 *	$Header: /private/joey/pg/src/lib/H/nodes/RCS/primnodes.h,v 1.34 1992/03/31 23:15:55 mer Exp joey $
d133 20
@


1.34
log
@change accessor functions into macros
@
text
@d17 1
a17 1
 *	$Header: /users/mer/pg/src/lib/H/nodes/RCS/primnodes.h,v 1.33 1991/11/07 20:14:45 glass Exp $
d274 1
d285 1
@


1.33
log
@prototype stuff
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.32 91/10/01 16:39:28 glass Exp Locker: glass $
d35 1
@


1.32
log
@initial ansi c compatibility checkin
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.31 91/06/18 23:28:17 cimarron Exp $
a70 9
extern void	OutResdom();
extern void	OutExpr();
extern void	OutParam();
extern void	OutFunc();
extern void	OutOper();
extern void	OutConst();
extern void	OutVar();
extern void	OutArray();

a96 8
extern bool	CopyResdom();
extern bool	CopyExpr();
extern bool	CopyParam();
extern bool	CopyFunc();
extern bool	CopyOper();
extern bool	CopyConst();
extern bool	CopyVar();
extern bool	CopyArray();
@


1.31
log
@reorganized executor to use tuple table properly for nested dot stuff
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.30 91/03/28 22:28:42 kemnitz Exp Locker: cimarron $
d140 1
a140 1
	inherits(Node);
d157 1
a157 1
	inherits(Node)
d176 1
a176 1
	inherits(Expr);
d210 1
a210 1
	inherits(Expr);
d236 1
a236 1
	inherits(Expr);
d273 1
a273 1
	inherits(Expr);
d294 1
a294 1
	inherits(Expr);
d315 1
a315 1
	inherits(Expr);
@


1.30
log
@Added #defines for array funcs
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.29 91/03/27 13:22:49 choi Exp Locker: kemnitz $
d120 11
a130 4
/*
 * ============
 * Resdom nodes
 * ============
d136 1
a137 1

a146 5
	/* ---------
	 *  set to nonzero to eliminate the attribute from final target list
	 *  e.g., ctid for replace and delete
	 * ---------
	 */
d151 3
a153 4
/*
 * ==========
 * Expr nodes
 * ==========
a154 1

d163 1
a163 7
/*
 * ==========
 * ExprContext nodes are now defined in execnodes.h -cim 11/1/89
 * ==========
 */

/*
d165 8
a172 5
 *	varno - 
 *	varattno - 
 *	vartype -
 *	vardotfields - 
 *	
a173 1

d183 1
d187 1
a187 2

/*
d189 2
a190 2
 *	opno - PG_OPERATOR OID of the operator
 *	opid -  PG_PROC OID for the operator
d192 3
a194 2
 *	opresulttype - PG_TYPE OID of the operator's return value
 *	opsize - size of return result (cached by executor)
d206 1
a206 1
 * ---
a207 1

d221 1
a221 1
/*
d232 1
a233 1

d245 1
a245 1
/*
d249 1
d269 1
a269 1
 * 
a270 1

d282 1
a282 1
/*
d284 7
a290 5
 *	funcid - PG_FUNCTION OID of the function
 *	functype - PG_TYPE OID of the function's return value
 *	funcisindex - the function can be evaluated by scanning an index
 *		(set during query optimization)
 *	funcsize - size of return result (cached by executor)
a291 1

d303 10
@


1.29
log
@added one more field arraylen for array node
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.28 91/03/27 12:32:12 choi Exp Locker: choi $
d69 1
d78 1
d91 1
d104 1
d113 1
@


1.28
log
@added array nodes
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.27 91/02/05 15:45:24 sp Exp Locker: choi $
d309 1
@


1.27
log
@The 'printFunc's (associated with every POSTGRES node) have been
replaced by the 'outFunc's which instead of printing the ascii
representation of an node to a file, they store it in a string.
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.26 91/01/19 14:40:19 sp Exp Locker: sp $
d180 1
a180 1
	Index			vararrayindex;
a181 1
	ObjectId		varelemtype;
d301 10
@


1.26
log
@'paramid' has now become an AttributeNumber (see comments),
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.25 90/12/27 19:18:49 sp Exp Locker: sp $
d59 1
a59 1
 *	Node Print Function declarations
d62 7
a68 7
#define	PrintResdomExists
#define	PrintExprExists
#define	PrintParamExists
#define	PrintFuncExists
#define	PrintOperExists
#define PrintConstExists
#define PrintVarExists
d70 7
a76 7
extern void	PrintResdom();
extern void	PrintExpr();
extern void	PrintParam();
extern void	PrintFunc();
extern void	PrintOper();
extern void	PrintConst();
extern void	PrintVar();
@


1.25
log
@Oper nodes now have a new field (opid) where the oid of the regproc
is stored (that used to be stored in 'opno' overriding the pg_operator
oid).
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.24 90/11/12 11:28:23 kemnitz Exp Locker: sp $
d255 1
a255 1
 *              The number is contained in the `parmid' field.
d258 3
a260 1
 *              The `paramname' refers to the "NEW" tuple
d275 1
a275 1
	int32			paramid;
@


1.24
log
@Added fcache to oper and func nodes.
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.23 90/10/10 18:50:49 hong Exp Locker: kemnitz $
d189 2
a190 2
 *	opno - at exit from parser: PG_OPERATOR OID of the operator
 *	       at exit from planner: PG_FUNCTION OID for the operator
d194 12
d212 1
@


1.23
log
@ added a new field to Resdom node
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.22 90/08/18 00:40:28 cimarron Exp Locker: hong $
d30 1
d203 1
d283 1
@


1.22
log
@eliminated less significant .h files
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.21 90/08/17 08:52:40 cimarron Exp Locker: cimarron $
d134 6
@


1.21
log
@added pathnames to #include statements
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.20 90/08/08 08:17:36 cimarron Exp Locker: cimarron $
a29 1
#include "tmp/name.h"
@


1.20
log
@reorganized some header files
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.19 90/05/31 11:08:23 cimarron Version_2 Locker: cimarron $
d24 1
a24 1
#include "postgres.h"
d26 6
a31 2
#include "nodes.h"	/* bogus inheritance system */
#include "pg_lisp.h"
d33 2
a34 6
#include "att.h"
#include "attnum.h"
#include "buf.h"
#include "rel.h"
#include "name.h"
#include "params.h"
@


1.19
log
@added constbyval field to the const node.
@
text
@d17 1
a17 1
 *	$Header: RCS/primnodes.h,v 1.18 90/05/25 13:11:47 cimarron Exp $
d24 2
a32 1
#include "oid.h"
a33 1
#include "cat.h"
@


1.18
log
@made changes to support node copy functions
@
text
@d17 1
a17 1
 *	$Header: RCS/slaves.c,v 1.2 90/03/31 19:01:51 cimarron Exp $
d208 4
d221 1
@


1.17
log
@Changed varnode to have varelemtype.
@
text
@d1 5
a5 2
/*
 * primnodes.h --
d8 4
a11 2
 * Identification:
 *	$Header: RCS/primnodes.h,v 1.16 90/05/17 23:11:41 kemnitz Exp Locker: kemnitz $
d13 1
a13 2
 * NOTES:
 *	For exhaustive explanations of what the structure members mean,
d15 4
d24 32
a55 5
/*
 *  These #defines indicate that we've written print support routines for
 *  the named classes.  The print routines are in lib/C/printfuncs.c.  The
 *  automatic inheritance generator builds interface and default routines
 *  that call those in printfuncs.c.
d58 4
d78 3
a80 2
/*
 *  Same for functions that test nodes for equality.
a81 1

d90 11
a100 2
#include "nodes.h"	/* bogus inheritance system */
#include "pg_lisp.h"
d102 7
a108 8
#include "att.h"
#include "attnum.h"
#include "buf.h"
#include "rel.h"
#include "oid.h"
#include "name.h"
#include "cat.h"
#include "params.h"
d110 5
d119 5
@


1.16
log
@Deleted array ref node.
@
text
@d6 1
a6 1
 *	$Header: RCS/primnodes.h,v 1.15 90/03/31 18:57:52 cimarron Exp Locker: kemnitz $
d119 1
@


1.15
log
@*** empty log message ***
@
text
@d6 1
a6 1
 *	$Header: RCS/primnodes.h,v 1.14 90/03/13 20:58:54 cimarron Exp $
a158 20
 /* public: */
};

/*
 * Array De-Reference node
 *
 * This is a special type of node that should be generated by the
 * parser, and should evaluate to a Const node when run by the Executor.
 *
 * The general format of the ArrayRef node is:
 *
 * (arrayref :arraydesc <varnode> (dimension_expression))
 *
 */

class (ArrayRef) public (Expr) {
 /* private: */
	inherits(Expr);
	Var			arraydesc;
	List			dimension_expression;
@


1.14
log
@removed Bool nodes
@
text
@d6 1
a6 1
 *	$Header: RCS/primnodes.h,v 1.13 90/03/12 07:17:32 kemnitz Exp $
d129 1
d138 1
d223 1
d232 1
@


1.13
log
@Added array stuff.
@
text
@d6 1
a6 1
 *	$Header: RCS/primnodes.h,v 1.12 90/01/04 17:17:33 sp Exp Locker: kemnitz $
d175 2
a176 2
	Var				arraydesc;
	LispValue		dimension_expression;
a178 14

/*
 * Bool		Expression whose value is either True or False.
 *
 *	boolvalue - the Bool's value (true or false)
 */

class (Bool) public (Expr) {
 /* private: */
	inherits(Expr);
	bool			boolvalue;
 /* public: */
};

@


1.12
log
@Param nodes have now a new field, called 'paramkind'
(see comments in lib/H/primnodes.h)
@
text
@d6 1
a6 1
 *	$Header: RCS/primnodes.h,v 1.11 89/11/02 18:05:54 cimarron Exp Locker: sp $
d160 19
@


1.11
log
@added support for Merge Joins in the executor
@
text
@d6 1
a6 1
 *	$Header: RCS/primnodes.h,v 1.10 89/10/13 01:16:17 sp Exp $
d177 16
d194 1
a194 2
 *	paramtype - attribute name for tuple-substitution parameters ("$.foo")
 *		(valid iff paramid == 0)
d196 1
d202 1
@


1.10
log
@added field 'ecxt_param_list_info' to ExprContext
@
text
@d6 1
a6 1
 *	$Header: RCS/primnodes.h,v 1.9 89/09/05 17:10:48 mao C_Demo_1 $
d97 1
a97 1
 * ExprContext nodes
a99 20

class (ExprContext) public (Node) {
#define ExprContextDefs \
	inherits(Node); \
	List	      ecxt_scantuple; \
	AttributePtr  ecxt_scantype; \
	Buffer	      ecxt_scan_buffer; \
	List	      ecxt_innertuple; \
	AttributePtr  ecxt_innertype; \
	Buffer	      ecxt_inner_buffer; \
	List	      ecxt_outertuple; \
	AttributePtr  ecxt_outertype; \
	Buffer	      ecxt_outer_buffer; \
	Relation      ecxt_relation; \
	Index	      ecxt_relid; \
	ParamListInfo ecxt_param_list_info
 /* private: */
	ExprContextDefs;
 /* public: */
};
@


1.9
log
@Working version of C-only demo
@
text
@d6 1
a6 1
 *	$Header: RCS/primnodes.h,v 1.8 89/08/24 21:24:16 cimarron Exp $
d61 1
d114 2
a115 1
	Index	      ecxt_relid
@


1.8
log
@forgot some more #includes..
@
text
@d6 1
a6 1
 *	$Header: RCS/primnodes.h,v 1.7 89/08/24 18:38:43 cimarron Exp $
@


1.7
log
@forgot a #include .. sigh
@
text
@d6 1
a6 1
 *	$Header: RCS/primnodes.h,v 1.3 89/08/09 17:52:11 cimarron Exp $
d52 2
d56 2
a60 1
#include "pg_lisp.h"
@


1.6
log
@had to fix another small error
@
text
@d52 1
@


1.5
log
@fixed an error in ExprContext nodes
@
text
@d111 1
@


1.4
log
@Added ExprContext nodes
@
text
@d98 1
a98 1
	inherits(Node) \
@


1.3
log
@added Bool node for qualifications
which return true/false instead of
Const values..
-Cim
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/cimarron/postgres3/src/lib/H/RCS/primnodes.h,v 1.2 89/08/01 16:17:46 goh Exp $
d90 23
@


1.2
log
@retrieve (x=1) checkin
@
text
@d6 1
a6 1
 *	$Header: primnodes.h,v 1.1 89/06/23 16:01:15 goh Locked $
d147 14
@


1.1
log
@Initial revision
@
text
@d16 35
d56 1
a56 1
#define List LispValue
d103 1
a103 1
	Index			varno;
@
