head	1.4;
access;
symbols
	REL9_0_0:1.4
	REL9_1_ALPHA1:1.4
	REL9_0_RC1:1.4
	REL9_0_BETA4:1.4
	REL9_0_STABLE:1.4.0.14
	REL9_0_BETA3:1.4
	REL9_0_BETA2:1.4
	REL7_4_29:1.1.1.1
	REL8_0_25:1.2
	REL8_1_21:1.2
	REL8_2_17:1.2
	REL8_3_11:1.2
	REL8_4_4:1.4
	REL9_0_BETA1:1.4
	REL9_0_ALPHA5_BRANCH:1.4.0.12
	REL9_0_ALPHA5:1.4
	REL7_4_28:1.1.1.1
	REL8_0_24:1.2
	REL8_1_20:1.2
	REL8_2_16:1.2
	REL8_3_10:1.2
	REL8_4_3:1.4
	REL9_0_ALPHA4:1.4
	REL9_0_ALPHA4_BRANCH:1.4.0.10
	REL8_5_ALPHA3:1.4
	REL8_5_ALPHA3_BRANCH:1.4.0.8
	REL7_4_27:1.1.1.1
	REL8_0_23:1.2
	REL8_1_19:1.2
	REL8_2_15:1.2
	REL8_3_9:1.2
	REL8_4_2:1.4
	REL8_5_ALPHA2:1.4
	REL8_5_ALPHA2_BRANCH:1.4.0.6
	REL7_4_26:1.1.1.1
	REL8_0_22:1.2
	REL8_1_18:1.2
	REL8_2_14:1.2
	REL8_3_8:1.2
	REL8_4_1:1.4
	REL8_5_ALPHA1:1.4
	REL8_5_ALPHA1_BRANCH:1.4.0.4
	REL8_4_STABLE:1.4.0.2
	REL8_4_0:1.4
	REL8_4_RC2:1.4
	REL8_4_RC1:1.4
	REL8_4_BETA2:1.4
	REL8_4_BETA1:1.4
	REL7_4_25:1.1.1.1
	REL8_0_21:1.2
	REL8_1_17:1.2
	REL8_2_13:1.2
	REL8_3_7:1.2
	REL7_4_24:1.1.1.1
	REL8_0_20:1.2
	REL8_1_16:1.2
	REL8_2_12:1.2
	REL8_3_6:1.2
	REL7_4_23:1.1.1.1
	REL8_0_19:1.2
	REL8_1_15:1.2
	REL8_2_11:1.2
	REL8_3_5:1.2
	REL7_4_22:1.1.1.1
	REL8_0_18:1.2
	REL8_1_14:1.2
	REL8_2_10:1.2
	REL8_3_4:1.2
	REL7_4_21:1.1.1.1
	REL8_0_17:1.2
	REL8_1_13:1.2
	REL8_2_9:1.2
	REL8_3_3:1.2
	REL7_4_20:1.1.1.1
	REL8_0_16:1.2
	REL8_1_12:1.2
	REL8_2_8:1.2
	REL8_3_2:1.2
	REL8_2_7:1.2
	REL8_3_1:1.2
	REL8_3_STABLE:1.2.0.10
	REL8_3_0:1.2
	REL8_3_RC2:1.2
	REL7_3_21:1.1.1.1
	REL7_4_19:1.1.1.1
	REL8_0_15:1.2
	REL8_1_11:1.2
	REL8_2_6:1.2
	REL8_3_RC1:1.2
	REL8_3_BETA4:1.2
	REL8_3_BETA3:1.2
	REL8_3_BETA2:1.2
	REL8_3_BETA1:1.2
	REL7_3_20:1.1.1.1
	REL7_4_18:1.1.1.1
	REL8_0_14:1.2
	REL8_1_10:1.2
	REL8_2_5:1.2
	REL7_3_19:1.1.1.1
	REL7_4_17:1.1.1.1
	REL8_0_13:1.2
	REL8_1_9:1.2
	REL8_2_4:1.2
	REL8_0_12:1.2
	REL8_1_8:1.2
	REL8_2_3:1.2
	REL7_3_18:1.1.1.1
	REL7_4_16:1.1.1.1
	REL8_0_11:1.2
	REL8_1_7:1.2
	REL8_2_2:1.2
	REL8_0_10:1.2
	REL8_1_6:1.2
	REL8_2_1:1.2
	REL7_4_15:1.1.1.1
	REL7_3_17:1.1.1.1
	REL8_2_STABLE:1.2.0.8
	REL8_2_0:1.2
	REL8_2_RC1:1.2
	REL8_2_BETA3:1.2
	REL8_2_BETA2:1.2
	REL8_1_5:1.2
	REL8_0_9:1.2
	REL7_4_14:1.1.1.1
	REL7_3_16:1.1.1.1
	REL8_2_BETA1:1.2
	REL7_3_15:1.1.1.1
	REL7_4_13:1.1.1.1
	REL8_0_8:1.2
	REL8_1_4:1.2
	REL7_3_14:1.1.1.1
	REL7_4_12:1.1.1.1
	REL8_0_7:1.2
	REL8_1_3:1.2
	REL7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1
	REL7_3_4:1.1.1.1
	REL7_3_2:1.1.1.1
	REL7_2_4:1.1.1.1
	REL7_3_STABLE:1.1.1.1.0.16
	REL7_2_3:1.1.1.1
	REL7_2_STABLE:1.1.1.1.0.14
	REL7_2:1.1.1.1
	REL7_2_RC2:1.1.1.1
	REL7_2_RC1:1.1.1.1
	REL7_2_BETA5:1.1.1.1
	REL7_2_BETA4:1.1.1.1
	REL7_2_BETA3:1.1.1.1
	REL7_2_BETA2:1.1.1.1
	REL7_2_BETA1:1.1.1.1
	REL7_1_2:1.1.1.1
	REL7_1_STABLE:1.1.1.1.0.12
	REL7_1_BETA:1.1.1.1
	REL7_1_BETA3:1.1.1.1
	REL7_1_BETA2:1.1.1.1
	REL7_1:1.1.1.1
	REL7_0_PATCHES:1.1.1.1.0.10
	REL7_0:1.1.1.1
	REL6_5_PATCHES:1.1.1.1.0.8
	REL6_5:1.1.1.1
	REL6_4:1.1.1.1.0.6
	release-6-3:1.1.1.1
	REL2_0B:1.1.1.1.0.4
	REL2_0:1.1.1.1
	Release_2_0_0:1.1.1.1
	Release_1_0_3:1.1.1.1.0.2
	Release_2_0:1.1.1.1
	Release_1_0_2:1.1.1.1
	PG95-1_01:1.1.1.1
	PG95_DIST:1.1.1;
locks; strict;
comment	@# @;


1.4
date	2008.08.25.22.42.32;	author tgl;	state Exp;
branches;
next	1.3;

1.3
date	2008.03.20.17.55.14;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	2003.11.29.22.39.45;	author pgsql;	state Exp;
branches;
next	1.1;

1.1
date	96.07.09.06.21.32;	author scrappy;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.07.09.06.21.32;	author scrappy;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Move exprType(), exprTypmod(), expression_tree_walker(), and related routines
into nodes/nodeFuncs, so as to reduce wanton cross-subsystem #includes inside
the backend.  There's probably more that should be done along this line,
but this is a start anyway.
@
text
@$PostgreSQL: pgsql/src/backend/nodes/README,v 1.3 2008/03/20 17:55:14 momjian Exp $

Node Structures
===============

Andrew Yu (11/94)

Introduction
------------

The current node structures are plain old C structures. "Inheritance" is
achieved by convention. No additional functions will be generated. Functions
that manipulate node structures reside in this directory.


FILES IN THIS DIRECTORY (src/backend/nodes/)

    General-purpose node manipulation functions:
	copyfuncs.c	- copy a node tree
	equalfuncs.c	- compare two node trees
	outfuncs.c	- convert a node tree to text representation
	readfuncs.c	- convert text representation back to a node tree
	makefuncs.c	- creator functions for some common node types
	nodeFuncs.c	- some other general-purpose manipulation functions

    Specialized manipulation functions:
	bitmapset.c	- Bitmapset support
	list.c		- generic list support
	params.c	- Param support
	tidbitmap.c	- TIDBitmap support
	value.c		- support for Value nodes

FILES IN src/include/nodes/

    Node definitions:
	nodes.h		- define node tags (NodeTag)
	primnodes.h	- primitive nodes
	parsenodes.h	- parse tree nodes
	plannodes.h	- plan tree nodes
	relation.h	- planner internal nodes
	execnodes.h	- executor nodes
	memnodes.h	- memory nodes
	pg_list.h	- generic list 


Steps to Add a Node
-------------------

Suppose you wanna define a node Foo:

1. Add a tag (T_Foo) to the enum NodeTag in nodes.h.  (If you insert the
   tag in a way that moves the numbers associated with existing tags,
   you'll need to recompile the whole tree after doing this.  It doesn't
   force initdb though, because the numbers never go to disk.)
2. Add the structure definition to the appropriate include/nodes/???.h file.
   If you intend to inherit from, say a Plan node, put Plan as the first field
   of your struct definition.
3. If you intend to use copyObject, equal, nodeToString or stringToNode,
   add an appropriate function to copyfuncs.c, equalfuncs.c, outfuncs.c
   and readfuncs.c accordingly.  (Except for frequently used nodes, don't
   bother writing a creator function in makefuncs.c)  The header comments
   in those files give general rules for whether you need to add support.
4. Add cases to the functions in nodeFuncs.c as needed.  There are many
   other places you'll probably also need to teach about your new node
   type.  Best bet is to grep for references to one or two similar existing
   node types to find all the places to touch.


Historical Note
---------------

Prior to the current simple C structure definitions, the Node structures 
used a pseudo-inheritance system which automatically generated creator and
accessor functions. Since every node inherited from LispValue, the whole thing
was a mess. Here's a little anecdote:

    LispValue definition -- class used to support lisp structures
    in C.  This is here because we did not want to totally rewrite
    planner and executor code which depended on lisp structures when
    we ported postgres V1 from lisp to C. -cim 4/23/90
@


1.3
log
@Make source code READMEs more consistent.  Add CVS tags to all README files.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/backend/access/gist/README,v 1.3 2005/09/16 14:40:54 teodor Exp $
d16 1
a16 1
FILES IN THIS DIRECTORY
d18 16
a33 6
    Node manipulation functions:
	copyfuncs.c	- copying a node
	equalfuncs.c	- comparing a node
	outfuncs.c	- convert a node to ascii representation
	readfuncs.c	- convert ascii representation back to a node
	makefuncs.c	- creator functions for primitive nodes
a36 1
	pg_list.h	- generic list 
d40 1
a40 1
	relation.h	- inner plan tree nodes
d43 1
d49 1
a49 1
Suppose you wana define a node Foo:
d51 8
a58 6
1. add a tag (T_Foo) to the enum NodeTag in nodes.h (You may have to
   recompile the whole tree after doing this.)
2. add the structure definition to the appropriate ???nodes.h file. If you
   intend to inherit from, say a Plan node, put Plan as the first field of
   you definition.
3. if you intend to use copyObject, equal, nodeToString or stringToNode,
d60 7
a66 2
   and readfuncs.c accordingly. (Except for frequently used nodes, don't
   bother writing a creator function in makefuncs.c)
d73 3
a75 3
uses a pseudo-inheritance system which automatically generates creator and
accessor functions. Since every node inherits from LispValue, the whole thing
is a mess. Here's a little anecdote:
a80 1
 
@


1.2
log
@
make sure the $Id tags are converted to $PostgreSQL as well ...
@
text
@d1 1
a1 10
*******************************************************************************
*                                                                             *
* EXPLANATION OF THE NODE STRUCTURES                                          *
*    - Andrew Yu (11/94)                                                      *
*                                                                             *
* Copyright (c) 1994, Regents of the University of California                 *
*                                                                             *
* $PostgreSQL: README,v 1.1.1.1 1996/07/09 06:21:32 scrappy Exp $
*                                                                             *
*******************************************************************************
d3 7
a9 1
INTRODUCTION
d36 2
a37 1
STEPS TO ADD A NODE
d52 2
a53 1
HISTORICAL NOTE
@


1.1
log
@Initial revision
@
text
@d8 1
a8 1
* $Id: README,v 1.1.1.1 1996/07/09 05:31:48 scrappy Exp $
@


1.1.1.1
log
@Postgres95 1.01 Distribution - Virgin Sources
@
text
@@
