summaryrefslogtreecommitdiff
path: root/src/include/nodes/parsenodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r--src/include/nodes/parsenodes.h730
1 files changed, 364 insertions, 366 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index c24d27918c2..aa311129159 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.24 1997/09/07 04:58:44 momjian Exp $
+ * $Id: parsenodes.h,v 1.25 1997/09/08 02:37:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,39 +33,38 @@
*/
typedef struct Query
{
- NodeTag type;
+ NodeTag type;
- CmdType commandType;/* select|insert|update|delete|utility */
+ CmdType commandType; /* select|insert|update|delete|utility */
- Node *utilityStmt;/* non-null if this is a non-optimizable
+ Node *utilityStmt; /* non-null if this is a non-optimizable
* statement */
- int resultRelation; /* target relation (index to
- * rtable) */
- char *into; /* portal (cursor) name */
- bool isPortal; /* is this a retrieve into portal? */
- bool isBinary; /* binary portal? */
+ int resultRelation; /* target relation (index to rtable) */
+ char *into; /* portal (cursor) name */
+ bool isPortal; /* is this a retrieve into portal? */
+ bool isBinary; /* binary portal? */
- char *uniqueFlag; /* NULL, '*', or Unique attribute name */
- List *sortClause; /* a list of SortClause's */
+ char *uniqueFlag; /* NULL, '*', or Unique attribute name */
+ List *sortClause; /* a list of SortClause's */
- List *rtable; /* list of range table entries */
- List *targetList; /* target list (of TargetEntry) */
- Node *qual; /* qualifications */
+ List *rtable; /* list of range table entries */
+ List *targetList; /* target list (of TargetEntry) */
+ Node *qual; /* qualifications */
- List *groupClause;/* list of columns to specified in GROUP
+ List *groupClause; /* list of columns to specified in GROUP
* BY */
- Node *havingQual; /* qualification of each group */
+ Node *havingQual; /* qualification of each group */
- int qry_numAgg; /* number of aggregates in the target list */
- Aggreg **qry_aggs; /* the aggregates */
+ int qry_numAgg; /* number of aggregates in the target list */
+ Aggreg **qry_aggs; /* the aggregates */
/* internal to planner */
- List *base_relation_list_; /* base relation list */
- List *join_relation_list_; /* list of relations
- * generated by joins */
- bool query_is_archival_; /* archival query flag */
-} Query;
+ List *base_relation_list_; /* base relation list */
+ List *join_relation_list_; /* list of relations generated by
+ * joins */
+ bool query_is_archival_; /* archival query flag */
+} Query;
/*****************************************************************************
@@ -83,11 +82,11 @@ typedef struct Query
*/
typedef struct AddAttrStmt
{
- NodeTag type;
- char *relname; /* the relation to add attr */
- bool inh; /* add recursively to children? */
+ NodeTag type;
+ char *relname; /* the relation to add attr */
+ bool inh; /* add recursively to children? */
struct ColumnDef *colDef; /* the attribute definition */
-} AddAttrStmt;
+} AddAttrStmt;
/* ----------------------
* Change ACL Statement
@@ -95,11 +94,11 @@ typedef struct AddAttrStmt
*/
typedef struct ChangeACLStmt
{
- NodeTag type;
+ NodeTag type;
struct AclItem *aclitem;
- unsigned modechg;
- List *relNames;
-} ChangeACLStmt;
+ unsigned modechg;
+ List *relNames;
+} ChangeACLStmt;
/* ----------------------
* Close Portal Statement
@@ -107,9 +106,9 @@ typedef struct ChangeACLStmt
*/
typedef struct ClosePortalStmt
{
- NodeTag type;
- char *portalname; /* name of the portal (cursor) */
-} ClosePortalStmt;
+ NodeTag type;
+ char *portalname; /* name of the portal (cursor) */
+} ClosePortalStmt;
/* ----------------------
* Copy Statement
@@ -117,14 +116,14 @@ typedef struct ClosePortalStmt
*/
typedef struct CopyStmt
{
- NodeTag type;
- bool binary; /* is a binary copy? */
- char *relname; /* the relation to copy */
- bool oids; /* copy oid's? */
- int direction; /* TO or FROM */
- char *filename; /* if NULL, use stdin/stdout */
- char *delimiter; /* delimiter character, \t by default */
-} CopyStmt;
+ NodeTag type;
+ bool binary; /* is a binary copy? */
+ char *relname; /* the relation to copy */
+ bool oids; /* copy oid's? */
+ int direction; /* TO or FROM */
+ char *filename; /* if NULL, use stdin/stdout */
+ char *delimiter; /* delimiter character, \t by default */
+} CopyStmt;
/* ----------------------
* Create Table Statement
@@ -133,32 +132,32 @@ typedef struct CopyStmt
typedef enum ArchType
{
ARCH_NONE, ARCH_LIGHT, ARCH_HEAVY /* archive mode */
-} ArchType;
+} ArchType;
typedef struct CreateStmt
{
- NodeTag type;
- char *relname; /* the relation to create */
- List *tableElts; /* column definitions list of ColumnDef */
- List *inhRelnames;/* relations to inherit from list of Value
+ NodeTag type;
+ char *relname; /* the relation to create */
+ List *tableElts; /* column definitions list of ColumnDef */
+ List *inhRelnames; /* relations to inherit from list of Value
* (string) */
- ArchType archiveType;/* archive mode (ARCH_NONE if none */
- int location; /* smgrid (-1 if none) */
- int archiveLoc; /* smgrid (-1 if none) */
- List *constraints;/* list of constraints (ConstaintDef) */
-} CreateStmt;
+ ArchType archiveType; /* archive mode (ARCH_NONE if none */
+ int location; /* smgrid (-1 if none) */
+ int archiveLoc; /* smgrid (-1 if none) */
+ List *constraints; /* list of constraints (ConstaintDef) */
+} CreateStmt;
typedef enum ConstrType
{
CONSTR_NONE, CONSTR_CHECK /* type of constaints */
-} ConstrType;
+} ConstrType;
typedef struct ConstraintDef
{
- ConstrType type;
- char *name; /* name */
- void *def; /* definition */
-} ConstraintDef;
+ ConstrType type;
+ char *name; /* name */
+ void *def; /* definition */
+} ConstraintDef;
/* ----------------------
* Create/Drop TRIGGER Statements
@@ -167,26 +166,26 @@ typedef struct ConstraintDef
typedef struct CreateTrigStmt
{
- NodeTag type;
- char *trigname; /* TRIGGER' name */
- char *relname; /* triggered relation */
- char *funcname; /* function to call (or NULL) */
- List *args; /* list of (T_String) Values or NULL */
- bool before; /* BEFORE/AFTER */
- bool row; /* ROW/STATEMENT */
- char actions[4]; /* Insert, Update, Delete */
- char *lang; /* NULL (which means Clanguage) */
- char *text; /* AS 'text' */
- List *attr; /* UPDATE OF a, b,... (NI) or NULL */
- char *when; /* WHEN 'a > 10 ...' (NI) or NULL */
-} CreateTrigStmt;
+ NodeTag type;
+ char *trigname; /* TRIGGER' name */
+ char *relname; /* triggered relation */
+ char *funcname; /* function to call (or NULL) */
+ List *args; /* list of (T_String) Values or NULL */
+ bool before; /* BEFORE/AFTER */
+ bool row; /* ROW/STATEMENT */
+ char actions[4]; /* Insert, Update, Delete */
+ char *lang; /* NULL (which means Clanguage) */
+ char *text; /* AS 'text' */
+ List *attr; /* UPDATE OF a, b,... (NI) or NULL */
+ char *when; /* WHEN 'a > 10 ...' (NI) or NULL */
+} CreateTrigStmt;
typedef struct DropTrigStmt
{
- NodeTag type;
- char *trigname; /* TRIGGER' name */
- char *relname; /* triggered relation */
-} DropTrigStmt;
+ NodeTag type;
+ char *trigname; /* TRIGGER' name */
+ char *relname; /* triggered relation */
+} DropTrigStmt;
/* ----------------------
* Create SEQUENCE Statement
@@ -195,10 +194,10 @@ typedef struct DropTrigStmt
typedef struct CreateSeqStmt
{
- NodeTag type;
- char *seqname; /* the relation to create */
- List *options;
-} CreateSeqStmt;
+ NodeTag type;
+ char *seqname; /* the relation to create */
+ List *options;
+} CreateSeqStmt;
/* ----------------------
* Create Version Statement
@@ -206,12 +205,12 @@ typedef struct CreateSeqStmt
*/
typedef struct VersionStmt
{
- NodeTag type;
- char *relname; /* the new relation */
- int direction; /* FORWARD | BACKWARD */
- char *fromRelname;/* relation to create a version */
- char *date; /* date of the snapshot */
-} VersionStmt;
+ NodeTag type;
+ char *relname; /* the new relation */
+ int direction; /* FORWARD | BACKWARD */
+ char *fromRelname; /* relation to create a version */
+ char *date; /* date of the snapshot */
+} VersionStmt;
/* ----------------------
* Create {Operator|Type|Aggregate} Statement
@@ -219,11 +218,11 @@ typedef struct VersionStmt
*/
typedef struct DefineStmt
{
- NodeTag type;
- int defType; /* OPERATOR|P_TYPE|AGGREGATE */
- char *defname;
- List *definition; /* a list of DefElem */
-} DefineStmt;
+ NodeTag type;
+ int defType; /* OPERATOR|P_TYPE|AGGREGATE */
+ char *defname;
+ List *definition; /* a list of DefElem */
+} DefineStmt;
/* ----------------------
* Drop Table Statement
@@ -231,10 +230,10 @@ typedef struct DefineStmt
*/
typedef struct DestroyStmt
{
- NodeTag type;
- List *relNames; /* relations to be dropped */
- bool sequence;
-} DestroyStmt;
+ NodeTag type;
+ List *relNames; /* relations to be dropped */
+ bool sequence;
+} DestroyStmt;
/* ----------------------
* Extend Index Statement
@@ -242,12 +241,12 @@ typedef struct DestroyStmt
*/
typedef struct ExtendStmt
{
- NodeTag type;
- char *idxname; /* name of the index */
- Node *whereClause;/* qualifications */
- List *rangetable; /* range table, filled in by
+ NodeTag type;
+ char *idxname; /* name of the index */
+ Node *whereClause; /* qualifications */
+ List *rangetable; /* range table, filled in by
* transformStmt() */
-} ExtendStmt;
+} ExtendStmt;
/* ----------------------
* Begin Recipe Statement
@@ -255,9 +254,9 @@ typedef struct ExtendStmt
*/
typedef struct RecipeStmt
{
- NodeTag type;
- char *recipeName; /* name of the recipe */
-} RecipeStmt;
+ NodeTag type;
+ char *recipeName; /* name of the recipe */
+} RecipeStmt;
/* ----------------------
* Fetch Statement
@@ -265,11 +264,11 @@ typedef struct RecipeStmt
*/
typedef struct FetchStmt
{
- NodeTag type;
- int direction; /* FORWARD or BACKWARD */
- int howMany; /* amount to fetch ("ALL" --> 0) */
- char *portalname; /* name of portal (cursor) */
-} FetchStmt;
+ NodeTag type;
+ int direction; /* FORWARD or BACKWARD */
+ int howMany; /* amount to fetch ("ALL" --> 0) */
+ char *portalname; /* name of portal (cursor) */
+} FetchStmt;
/* ----------------------
* Create Index Statement
@@ -277,19 +276,18 @@ typedef struct FetchStmt
*/
typedef struct IndexStmt
{
- NodeTag type;
- char *idxname; /* name of the index */
- char *relname; /* name of relation to index on */
- char *accessMethod; /* name of acess methood (eg.
- * btree) */
- List *indexParams;/* a list of IndexElem */
- List *withClause; /* a list of ParamString */
- Node *whereClause;/* qualifications */
- List *rangetable; /* range table, filled in by
+ NodeTag type;
+ char *idxname; /* name of the index */
+ char *relname; /* name of relation to index on */
+ char *accessMethod; /* name of acess methood (eg. btree) */
+ List *indexParams; /* a list of IndexElem */
+ List *withClause; /* a list of ParamString */
+ Node *whereClause; /* qualifications */
+ List *rangetable; /* range table, filled in by
* transformStmt() */
- bool *lossy; /* is index lossy? */
- bool unique; /* is index unique? */
-} IndexStmt;
+ bool *lossy; /* is index lossy? */
+ bool unique; /* is index unique? */
+} IndexStmt;
/* ----------------------
* Move Statement (Not implemented)
@@ -297,12 +295,12 @@ typedef struct IndexStmt
*/
typedef struct MoveStmt
{
- NodeTag type;
- int direction; /* FORWARD or BACKWARD */
- bool to;
- int where;
- char *portalname;
-} MoveStmt;
+ NodeTag type;
+ int direction; /* FORWARD or BACKWARD */
+ bool to;
+ int where;
+ char *portalname;
+} MoveStmt;
/* ----------------------
* Create Function Statement
@@ -310,16 +308,16 @@ typedef struct MoveStmt
*/
typedef struct ProcedureStmt
{
- NodeTag type;
- char *funcname; /* name of function to create */
- List *defArgs; /* list of definitions a list of strings
+ NodeTag type;
+ char *funcname; /* name of function to create */
+ List *defArgs; /* list of definitions a list of strings
* (as Value *) */
- Node *returnType; /* the return type (as a string or a
+ Node *returnType; /* the return type (as a string or a
* TypeName (ie.setof) */
- List *withClause; /* a list of ParamString */
- char *as; /* the SQL statement or filename */
- char *language; /* C or SQL */
-} ProcedureStmt;
+ List *withClause; /* a list of ParamString */
+ char *as; /* the SQL statement or filename */
+ char *language; /* C or SQL */
+} ProcedureStmt;
/* ----------------------
* Purge Statement
@@ -327,11 +325,11 @@ typedef struct ProcedureStmt
*/
typedef struct PurgeStmt
{
- NodeTag type;
- char *relname; /* relation to purge */
- char *beforeDate; /* purge before this date */
- char *afterDate; /* purge after this date */
-} PurgeStmt;
+ NodeTag type;
+ char *relname; /* relation to purge */
+ char *beforeDate; /* purge before this date */
+ char *afterDate; /* purge after this date */
+} PurgeStmt;
/* ----------------------
* Drop Aggregate Statement
@@ -339,10 +337,10 @@ typedef struct PurgeStmt
*/
typedef struct RemoveAggrStmt
{
- NodeTag type;
- char *aggname; /* aggregate to drop */
- char *aggtype; /* for this type */
-} RemoveAggrStmt;
+ NodeTag type;
+ char *aggname; /* aggregate to drop */
+ char *aggtype; /* for this type */
+} RemoveAggrStmt;
/* ----------------------
* Drop Function Statement
@@ -350,10 +348,10 @@ typedef struct RemoveAggrStmt
*/
typedef struct RemoveFuncStmt
{
- NodeTag type;
- char *funcname; /* function to drop */
- List *args; /* types of the arguments */
-} RemoveFuncStmt;
+ NodeTag type;
+ char *funcname; /* function to drop */
+ List *args; /* types of the arguments */
+} RemoveFuncStmt;
/* ----------------------
* Drop Operator Statement
@@ -361,10 +359,10 @@ typedef struct RemoveFuncStmt
*/
typedef struct RemoveOperStmt
{
- NodeTag type;
- char *opname; /* operator to drop */
- List *args; /* types of the arguments */
-} RemoveOperStmt;
+ NodeTag type;
+ char *opname; /* operator to drop */
+ List *args; /* types of the arguments */
+} RemoveOperStmt;
/* ----------------------
* Drop {Type|Index|Rule|View} Statement
@@ -372,10 +370,10 @@ typedef struct RemoveOperStmt
*/
typedef struct RemoveStmt
{
- NodeTag type;
- int removeType; /* P_TYPE|INDEX|RULE|VIEW */
- char *name; /* name to drop */
-} RemoveStmt;
+ NodeTag type;
+ int removeType; /* P_TYPE|INDEX|RULE|VIEW */
+ char *name; /* name to drop */
+} RemoveStmt;
/* ----------------------
* Alter Table Statement
@@ -383,14 +381,14 @@ typedef struct RemoveStmt
*/
typedef struct RenameStmt
{
- NodeTag type;
- char *relname; /* relation to be altered */
- bool inh; /* recursively alter children? */
- char *column; /* if NULL, rename the relation name to
+ NodeTag type;
+ char *relname; /* relation to be altered */
+ bool inh; /* recursively alter children? */
+ char *column; /* if NULL, rename the relation name to
* the new name. Otherwise, rename this
* column name. */
- char *newname; /* the new name */
-} RenameStmt;
+ char *newname; /* the new name */
+} RenameStmt;
/* ----------------------
* Create Rule Statement
@@ -398,14 +396,14 @@ typedef struct RenameStmt
*/
typedef struct RuleStmt
{
- NodeTag type;
- char *rulename; /* name of the rule */
- Node *whereClause;/* qualifications */
- CmdType event; /* RETRIEVE */
- struct Attr *object; /* object affected */
- bool instead; /* is a 'do instead'? */
- List *actions; /* the action statements */
-} RuleStmt;
+ NodeTag type;
+ char *rulename; /* name of the rule */
+ Node *whereClause; /* qualifications */
+ CmdType event; /* RETRIEVE */
+ struct Attr *object; /* object affected */
+ bool instead; /* is a 'do instead'? */
+ List *actions; /* the action statements */
+} RuleStmt;
/* ----------------------
* Notify Statement
@@ -413,9 +411,9 @@ typedef struct RuleStmt
*/
typedef struct NotifyStmt
{
- NodeTag type;
- char *relname; /* relation to notify */
-} NotifyStmt;
+ NodeTag type;
+ char *relname; /* relation to notify */
+} NotifyStmt;
/* ----------------------
* Listen Statement
@@ -423,9 +421,9 @@ typedef struct NotifyStmt
*/
typedef struct ListenStmt
{
- NodeTag type;
- char *relname; /* relation to listen on */
-} ListenStmt;
+ NodeTag type;
+ char *relname; /* relation to listen on */
+} ListenStmt;
/* ----------------------
* {Begin|Abort|End} Transaction Statement
@@ -433,9 +431,9 @@ typedef struct ListenStmt
*/
typedef struct TransactionStmt
{
- NodeTag type;
- int command; /* BEGIN|END|ABORT */
-} TransactionStmt;
+ NodeTag type;
+ int command; /* BEGIN|END|ABORT */
+} TransactionStmt;
/* ----------------------
* Create View Statement
@@ -443,10 +441,10 @@ typedef struct TransactionStmt
*/
typedef struct ViewStmt
{
- NodeTag type;
- char *viewname; /* name of the view */
- Query *query; /* the SQL statement */
-} ViewStmt;
+ NodeTag type;
+ char *viewname; /* name of the view */
+ Query *query; /* the SQL statement */
+} ViewStmt;
/* ----------------------
* Load Statement
@@ -454,9 +452,9 @@ typedef struct ViewStmt
*/
typedef struct LoadStmt
{
- NodeTag type;
- char *filename; /* file to load */
-} LoadStmt;
+ NodeTag type;
+ char *filename; /* file to load */
+} LoadStmt;
/* ----------------------
* Createdb Statement
@@ -464,9 +462,9 @@ typedef struct LoadStmt
*/
typedef struct CreatedbStmt
{
- NodeTag type;
- char *dbname; /* database to create */
-} CreatedbStmt;
+ NodeTag type;
+ char *dbname; /* database to create */
+} CreatedbStmt;
/* ----------------------
* Destroydb Statement
@@ -474,9 +472,9 @@ typedef struct CreatedbStmt
*/
typedef struct DestroydbStmt
{
- NodeTag type;
- char *dbname; /* database to drop */
-} DestroydbStmt;
+ NodeTag type;
+ char *dbname; /* database to drop */
+} DestroydbStmt;
/* ----------------------
* Cluster Statement (support pbrown's cluster index implementation)
@@ -484,10 +482,10 @@ typedef struct DestroydbStmt
*/
typedef struct ClusterStmt
{
- NodeTag type;
- char *relname; /* relation being indexed */
- char *indexname; /* original index defined */
-} ClusterStmt;
+ NodeTag type;
+ char *relname; /* relation being indexed */
+ char *indexname; /* original index defined */
+} ClusterStmt;
/* ----------------------
* Vacuum Statement
@@ -495,12 +493,12 @@ typedef struct ClusterStmt
*/
typedef struct VacuumStmt
{
- NodeTag type;
- bool verbose; /* print status info */
- bool analyze; /* analyze data */
- char *vacrel; /* table to vacuum */
- List *va_spec; /* columns to analyse */
-} VacuumStmt;
+ NodeTag type;
+ bool verbose; /* print status info */
+ bool analyze; /* analyze data */
+ char *vacrel; /* table to vacuum */
+ List *va_spec; /* columns to analyse */
+} VacuumStmt;
/* ----------------------
* Explain Statement
@@ -508,10 +506,10 @@ typedef struct VacuumStmt
*/
typedef struct ExplainStmt
{
- NodeTag type;
- Query *query; /* the query */
- bool verbose; /* print plan info */
-} ExplainStmt;
+ NodeTag type;
+ Query *query; /* the query */
+ bool verbose; /* print plan info */
+} ExplainStmt;
/* ----------------------
* Set Statement
@@ -520,10 +518,10 @@ typedef struct ExplainStmt
typedef struct VariableSetStmt
{
- NodeTag type;
- char *name;
- char *value;
-} VariableSetStmt;
+ NodeTag type;
+ char *name;
+ char *value;
+} VariableSetStmt;
/* ----------------------
* Show Statement
@@ -532,9 +530,9 @@ typedef struct VariableSetStmt
typedef struct VariableShowStmt
{
- NodeTag type;
- char *name;
-} VariableShowStmt;
+ NodeTag type;
+ char *name;
+} VariableShowStmt;
/* ----------------------
* Reset Statement
@@ -543,9 +541,9 @@ typedef struct VariableShowStmt
typedef struct VariableResetStmt
{
- NodeTag type;
- char *name;
-} VariableResetStmt;
+ NodeTag type;
+ char *name;
+} VariableResetStmt;
/*****************************************************************************
@@ -558,13 +556,13 @@ typedef struct VariableResetStmt
*/
typedef struct AppendStmt
{
- NodeTag type;
- char *relname; /* relation to insert into */
- List *cols; /* names of the columns */
- List *targetList; /* the target list (of ResTarget) */
- List *fromClause; /* the from clause */
- Node *whereClause;/* qualifications */
-} AppendStmt;
+ NodeTag type;
+ char *relname; /* relation to insert into */
+ List *cols; /* names of the columns */
+ List *targetList; /* the target list (of ResTarget) */
+ List *fromClause; /* the from clause */
+ Node *whereClause; /* qualifications */
+} AppendStmt;
/* ----------------------
* Delete Statement
@@ -572,10 +570,10 @@ typedef struct AppendStmt
*/
typedef struct DeleteStmt
{
- NodeTag type;
- char *relname; /* relation to delete from */
- Node *whereClause;/* qualifications */
-} DeleteStmt;
+ NodeTag type;
+ char *relname; /* relation to delete from */
+ Node *whereClause; /* qualifications */
+} DeleteStmt;
/* ----------------------
* Update Statement
@@ -583,12 +581,12 @@ typedef struct DeleteStmt
*/
typedef struct ReplaceStmt
{
- NodeTag type;
- char *relname; /* relation to update */
- List *targetList; /* the target list (of ResTarget) */
- Node *whereClause;/* qualifications */
- List *fromClause; /* the from clause */
-} ReplaceStmt;
+ NodeTag type;
+ char *relname; /* relation to update */
+ List *targetList; /* the target list (of ResTarget) */
+ Node *whereClause; /* qualifications */
+ List *fromClause; /* the from clause */
+} ReplaceStmt;
/* ----------------------
* Create Cursor Statement
@@ -596,16 +594,16 @@ typedef struct ReplaceStmt
*/
typedef struct CursorStmt
{
- NodeTag type;
- char *portalname; /* the portal (cursor) to create */
- bool binary; /* a binary (internal) portal? */
- char *unique; /* NULL, "*", or unique attribute name */
- List *targetList; /* the target list (of ResTarget) */
- List *fromClause; /* the from clause */
- Node *whereClause;/* qualifications */
- List *groupClause;/* group by clause */
- List *sortClause; /* sort clause (a list of SortGroupBy's) */
-} CursorStmt;
+ NodeTag type;
+ char *portalname; /* the portal (cursor) to create */
+ bool binary; /* a binary (internal) portal? */
+ char *unique; /* NULL, "*", or unique attribute name */
+ List *targetList; /* the target list (of ResTarget) */
+ List *fromClause; /* the from clause */
+ Node *whereClause; /* qualifications */
+ List *groupClause; /* group by clause */
+ List *sortClause; /* sort clause (a list of SortGroupBy's) */
+} CursorStmt;
/* ----------------------
* Select Statement
@@ -613,17 +611,17 @@ typedef struct CursorStmt
*/
typedef struct RetrieveStmt
{
- NodeTag type;
- char *unique; /* NULL, '*', or unique attribute name */
- char *into; /* name of table (for select into table) */
- List *targetList; /* the target list (of ResTarget) */
- List *fromClause; /* the from clause */
- Node *whereClause;/* qualifications */
- List *groupClause;/* group by clause */
- Node *havingClause; /* having conditional-expression */
- List *selectClause; /* subselect parameters */
- List *sortClause; /* sort clause (a list of SortGroupBy's) */
-} RetrieveStmt;
+ NodeTag type;
+ char *unique; /* NULL, '*', or unique attribute name */
+ char *into; /* name of table (for select into table) */
+ List *targetList; /* the target list (of ResTarget) */
+ List *fromClause; /* the from clause */
+ Node *whereClause; /* qualifications */
+ List *groupClause; /* group by clause */
+ Node *havingClause; /* having conditional-expression */
+ List *selectClause; /* subselect parameters */
+ List *sortClause; /* sort clause (a list of SortGroupBy's) */
+} RetrieveStmt;
/****************************************************************************
@@ -635,50 +633,50 @@ typedef struct RetrieveStmt
*/
typedef struct SubSelect
{
- NodeTag type;
- char *unique; /* NULL, '*', or unique attribute name */
- List *targetList; /* the target list (of ResTarget) */
- List *fromClause; /* the from clause */
- Node *whereClause;/* qualifications */
- List *groupClause;/* group by clause */
- Node *havingClause; /* having conditional-expression */
-} SubSelect;
+ NodeTag type;
+ char *unique; /* NULL, '*', or unique attribute name */
+ List *targetList; /* the target list (of ResTarget) */
+ List *fromClause; /* the from clause */
+ Node *whereClause; /* qualifications */
+ List *groupClause; /* group by clause */
+ Node *havingClause; /* having conditional-expression */
+} SubSelect;
/*
* TypeName - specifies a type in definitions
*/
typedef struct TypeName
{
- NodeTag type;
- char *name; /* name of the type */
- bool timezone; /* timezone specified? */
- bool setof; /* is a set? */
- List *arrayBounds;/* array bounds */
- int typlen; /* length for char() and varchar() */
-} TypeName;
+ NodeTag type;
+ char *name; /* name of the type */
+ bool timezone; /* timezone specified? */
+ bool setof; /* is a set? */
+ List *arrayBounds; /* array bounds */
+ int typlen; /* length for char() and varchar() */
+} TypeName;
/*
* ParamNo - specifies a parameter reference
*/
typedef struct ParamNo
{
- NodeTag type;
- int number; /* the number of the parameter */
- TypeName *typename; /* the typecast */
-} ParamNo;
+ NodeTag type;
+ int number; /* the number of the parameter */
+ TypeName *typename; /* the typecast */
+} ParamNo;
/*
* A_Expr - binary expressions
*/
typedef struct A_Expr
{
- NodeTag type;
- int oper; /* type of operation
+ NodeTag type;
+ int oper; /* type of operation
* {OP,OR,AND,NOT,ISNULL,NOTNULL} */
- char *opname; /* name of operator/function */
- Node *lexpr; /* left argument */
- Node *rexpr; /* right argument */
-} A_Expr;
+ char *opname; /* name of operator/function */
+ Node *lexpr; /* left argument */
+ Node *rexpr; /* right argument */
+} A_Expr;
/*
* Attr -
@@ -688,35 +686,35 @@ typedef struct A_Expr
*/
typedef struct Attr
{
- NodeTag type;
- char *relname; /* name of relation (can be "*") */
- ParamNo *paramNo; /* or a parameter */
- List *attrs; /* attributes (possibly nested); list of
+ NodeTag type;
+ char *relname; /* name of relation (can be "*") */
+ ParamNo *paramNo; /* or a parameter */
+ List *attrs; /* attributes (possibly nested); list of
* Values (strings) */
- List *indirection;/* array refs (list of A_Indices') */
-} Attr;
+ List *indirection; /* array refs (list of A_Indices') */
+} Attr;
/*
* A_Const - a constant expression
*/
typedef struct A_Const
{
- NodeTag type;
- Value val; /* the value (with the tag) */
- TypeName *typename; /* typecast */
-} A_Const;
+ NodeTag type;
+ Value val; /* the value (with the tag) */
+ TypeName *typename; /* typecast */
+} A_Const;
/*
* ColumnDef - column definition (used in various creates)
*/
typedef struct ColumnDef
{
- NodeTag type;
- char *colname; /* name of column */
- TypeName *typename; /* type of column */
- bool is_not_null;/* flag to NOT NULL constraint */
- char *defval; /* default value of column */
-} ColumnDef;
+ NodeTag type;
+ char *colname; /* name of column */
+ TypeName *typename; /* type of column */
+ bool is_not_null; /* flag to NOT NULL constraint */
+ char *defval; /* default value of column */
+} ColumnDef;
/*
* Ident -
@@ -727,32 +725,32 @@ typedef struct ColumnDef
*/
typedef struct Ident
{
- NodeTag type;
- char *name; /* its name */
- List *indirection;/* array references */
- bool isRel; /* is a relation - filled in by
+ NodeTag type;
+ char *name; /* its name */
+ List *indirection; /* array references */
+ bool isRel; /* is a relation - filled in by
* transformExpr() */
-} Ident;
+} Ident;
/*
* FuncCall - a function/aggregate invocation
*/
typedef struct FuncCall
{
- NodeTag type;
- char *funcname; /* name of function */
- List *args; /* the arguments (list of exprs) */
-} FuncCall;
+ NodeTag type;
+ char *funcname; /* name of function */
+ List *args; /* the arguments (list of exprs) */
+} FuncCall;
/*
* A_Indices - array reference or bounds ([lidx:uidx] or [uidx])
*/
typedef struct A_Indices
{
- NodeTag type;
- Node *lidx; /* could be NULL */
- Node *uidx;
-} A_Indices;
+ NodeTag type;
+ Node *lidx; /* could be NULL */
+ Node *uidx;
+} A_Indices;
/*
* ResTarget -
@@ -760,77 +758,77 @@ typedef struct A_Indices
*/
typedef struct ResTarget
{
- NodeTag type;
- char *name; /* name of the result column */
- List *indirection;/* array references */
- Node *val; /* the value of the result (A_Expr or
+ NodeTag type;
+ char *name; /* name of the result column */
+ List *indirection; /* array references */
+ Node *val; /* the value of the result (A_Expr or
* Attr) (or A_Const) */
-} ResTarget;
+} ResTarget;
/*
* ParamString - used in with clauses
*/
typedef struct ParamString
{
- NodeTag type;
- char *name;
- char *val;
-} ParamString;
+ NodeTag type;
+ char *name;
+ char *val;
+} ParamString;
/*
* TimeRange - specifies a time range
*/
typedef struct TimeRange
{
- NodeTag type;
- char *startDate;
- char *endDate; /* snapshot if NULL */
-} TimeRange;
+ NodeTag type;
+ char *startDate;
+ char *endDate; /* snapshot if NULL */
+} TimeRange;
/*
* RelExpr - relation expressions
*/
typedef struct RelExpr
{
- NodeTag type;
- char *relname; /* the relation name */
- bool inh; /* inheritance query */
- TimeRange *timeRange; /* the time range */
-} RelExpr;
+ NodeTag type;
+ char *relname; /* the relation name */
+ bool inh; /* inheritance query */
+ TimeRange *timeRange; /* the time range */
+} RelExpr;
/*
* SortGroupBy - for order by clause
*/
typedef struct SortGroupBy
{
- NodeTag type;
- int resno; /* target number */
- char *range;
- char *name; /* name of column to sort on */
- char *useOp; /* operator to use */
-} SortGroupBy;
+ NodeTag type;
+ int resno; /* target number */
+ char *range;
+ char *name; /* name of column to sort on */
+ char *useOp; /* operator to use */
+} SortGroupBy;
/*
* RangeVar - range variable, used in from clauses
*/
typedef struct RangeVar
{
- NodeTag type;
- RelExpr *relExpr; /* the relation expression */
- char *name; /* the name to be referenced (optional) */
-} RangeVar;
+ NodeTag type;
+ RelExpr *relExpr; /* the relation expression */
+ char *name; /* the name to be referenced (optional) */
+} RangeVar;
/*
* IndexElem - index parameters (used in create index)
*/
typedef struct IndexElem
{
- NodeTag type;
- char *name; /* name of index */
- List *args; /* if not NULL, function index */
- char *class;
- TypeName *tname; /* type of index's keys (optional) */
-} IndexElem;
+ NodeTag type;
+ char *name; /* name of index */
+ List *args; /* if not NULL, function index */
+ char *class;
+ TypeName *tname; /* type of index's keys (optional) */
+} IndexElem;
/*
* DefElem -
@@ -838,10 +836,10 @@ typedef struct IndexElem
*/
typedef struct DefElem
{
- NodeTag type;
- char *defname;
- Node *arg; /* a (Value *) or a (TypeName *) */
-} DefElem;
+ NodeTag type;
+ char *defname;
+ Node *arg; /* a (Value *) or a (TypeName *) */
+} DefElem;
/****************************************************************************
@@ -857,11 +855,11 @@ typedef struct DefElem
*/
typedef struct TargetEntry
{
- NodeTag type;
- Resdom *resdom; /* fjoin overload this to be a list?? */
- Fjoin *fjoin;
- Node *expr; /* can be a list too */
-} TargetEntry;
+ NodeTag type;
+ Resdom *resdom; /* fjoin overload this to be a list?? */
+ Fjoin *fjoin;
+ Node *expr; /* can be a list too */
+} TargetEntry;
/*
* RangeTblEntry -
@@ -877,17 +875,17 @@ typedef struct TargetEntry
*/
typedef struct RangeTblEntry
{
- NodeTag type;
- char *relname; /* real name of the relation */
- TimeRange *timeRange; /* time range */
- char *refname; /* the reference name (specified in the
+ NodeTag type;
+ char *relname; /* real name of the relation */
+ TimeRange *timeRange; /* time range */
+ char *refname; /* the reference name (specified in the
* from clause) */
- Oid relid;
- bool inh; /* inheritance? */
- bool archive; /* filled in by plan_archive */
- bool inFromCl; /* comes from From Clause */
- TimeQual timeQual; /* filled in by pg_plan */
-} RangeTblEntry;
+ Oid relid;
+ bool inh; /* inheritance? */
+ bool archive; /* filled in by plan_archive */
+ bool inFromCl; /* comes from From Clause */
+ TimeQual timeQual; /* filled in by pg_plan */
+} RangeTblEntry;
/*
* SortClause -
@@ -895,10 +893,10 @@ typedef struct RangeTblEntry
*/
typedef struct SortClause
{
- NodeTag type;
- Resdom *resdom; /* attributes in tlist to be sorted */
- Oid opoid; /* sort operators */
-} SortClause;
+ NodeTag type;
+ Resdom *resdom; /* attributes in tlist to be sorted */
+ Oid opoid; /* sort operators */
+} SortClause;
/*
* GroupClause -
@@ -906,9 +904,9 @@ typedef struct SortClause
*/
typedef struct GroupClause
{
- NodeTag type;
- TargetEntry *entry; /* attributes to group on */
- Oid grpOpoid; /* the sort operator to use */
-} GroupClause;
+ NodeTag type;
+ TargetEntry *entry; /* attributes to group on */
+ Oid grpOpoid; /* the sort operator to use */
+} GroupClause;
#endif /* PARSENODES_H */