|
|
@ -6,7 +6,7 @@ |
|
|
|
* |
|
|
|
* |
|
|
|
* Copyright (c) 1994, Regents of the University of California |
|
|
|
* Copyright (c) 1994, Regents of the University of California |
|
|
|
* |
|
|
|
* |
|
|
|
* $Id: parsenodes.h,v 1.28 1997/09/29 06:01:46 vadim Exp $ |
|
|
|
* $Id: parsenodes.h,v 1.29 1997/10/28 15:10:39 vadim Exp $ |
|
|
|
* |
|
|
|
* |
|
|
|
*------------------------------------------------------------------------- |
|
|
|
*------------------------------------------------------------------------- |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -64,7 +64,7 @@ typedef struct Query |
|
|
|
List *join_relation_list_; /* list of relations generated by
|
|
|
|
List *join_relation_list_; /* list of relations generated by
|
|
|
|
* joins */ |
|
|
|
* joins */ |
|
|
|
bool query_is_archival_; /* archival query flag */ |
|
|
|
bool query_is_archival_; /* archival query flag */ |
|
|
|
} Query; |
|
|
|
} Query; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
/*****************************************************************************
|
|
|
@ -98,7 +98,7 @@ typedef struct ChangeACLStmt |
|
|
|
struct AclItem *aclitem; |
|
|
|
struct AclItem *aclitem; |
|
|
|
unsigned modechg; |
|
|
|
unsigned modechg; |
|
|
|
List *relNames; |
|
|
|
List *relNames; |
|
|
|
} ChangeACLStmt; |
|
|
|
} ChangeACLStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Close Portal Statement |
|
|
|
* Close Portal Statement |
|
|
@ -108,7 +108,7 @@ typedef struct ClosePortalStmt |
|
|
|
{ |
|
|
|
{ |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *portalname; /* name of the portal (cursor) */ |
|
|
|
char *portalname; /* name of the portal (cursor) */ |
|
|
|
} ClosePortalStmt; |
|
|
|
} ClosePortalStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Copy Statement |
|
|
|
* Copy Statement |
|
|
@ -123,7 +123,7 @@ typedef struct CopyStmt |
|
|
|
int direction; /* TO or FROM */ |
|
|
|
int direction; /* TO or FROM */ |
|
|
|
char *filename; /* if NULL, use stdin/stdout */ |
|
|
|
char *filename; /* if NULL, use stdin/stdout */ |
|
|
|
char *delimiter; /* delimiter character, \t by default */ |
|
|
|
char *delimiter; /* delimiter character, \t by default */ |
|
|
|
} CopyStmt; |
|
|
|
} CopyStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Create Table Statement |
|
|
|
* Create Table Statement |
|
|
@ -145,19 +145,19 @@ typedef struct CreateStmt |
|
|
|
int location; /* smgrid (-1 if none) */ |
|
|
|
int location; /* smgrid (-1 if none) */ |
|
|
|
int archiveLoc; /* smgrid (-1 if none) */ |
|
|
|
int archiveLoc; /* smgrid (-1 if none) */ |
|
|
|
List *constraints; /* list of constraints (ConstaintDef) */ |
|
|
|
List *constraints; /* list of constraints (ConstaintDef) */ |
|
|
|
} CreateStmt; |
|
|
|
} CreateStmt; |
|
|
|
|
|
|
|
|
|
|
|
typedef enum ConstrType |
|
|
|
typedef enum ConstrType |
|
|
|
{ |
|
|
|
{ |
|
|
|
CONSTR_NONE, CONSTR_CHECK /* type of constaints */ |
|
|
|
CONSTR_NONE, CONSTR_CHECK /* type of constaints */ |
|
|
|
} ConstrType; |
|
|
|
} ConstrType; |
|
|
|
|
|
|
|
|
|
|
|
typedef struct ConstraintDef |
|
|
|
typedef struct ConstraintDef |
|
|
|
{ |
|
|
|
{ |
|
|
|
ConstrType type; |
|
|
|
ConstrType type; |
|
|
|
char *name; /* name */ |
|
|
|
char *name; /* name */ |
|
|
|
void *def; /* definition */ |
|
|
|
void *def; /* definition */ |
|
|
|
} ConstraintDef; |
|
|
|
} ConstraintDef; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Create/Drop TRIGGER Statements |
|
|
|
* Create/Drop TRIGGER Statements |
|
|
@ -178,14 +178,35 @@ typedef struct CreateTrigStmt |
|
|
|
char *text; /* AS 'text' */ |
|
|
|
char *text; /* AS 'text' */ |
|
|
|
List *attr; /* UPDATE OF a, b,... (NI) or NULL */ |
|
|
|
List *attr; /* UPDATE OF a, b,... (NI) or NULL */ |
|
|
|
char *when; /* WHEN 'a > 10 ...' (NI) or NULL */ |
|
|
|
char *when; /* WHEN 'a > 10 ...' (NI) or NULL */ |
|
|
|
} CreateTrigStmt; |
|
|
|
} CreateTrigStmt; |
|
|
|
|
|
|
|
|
|
|
|
typedef struct DropTrigStmt |
|
|
|
typedef struct DropTrigStmt |
|
|
|
{ |
|
|
|
{ |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *trigname; /* TRIGGER' name */ |
|
|
|
char *trigname; /* TRIGGER' name */ |
|
|
|
char *relname; /* triggered relation */ |
|
|
|
char *relname; /* triggered relation */ |
|
|
|
} DropTrigStmt; |
|
|
|
} DropTrigStmt; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
|
|
|
|
* Create/Drop PROCEDURAL LANGUAGE Statement |
|
|
|
|
|
|
|
* ---------------------- |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
typedef struct CreatePLangStmt |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
NodeTag type; |
|
|
|
|
|
|
|
char *plname; /* PL name */ |
|
|
|
|
|
|
|
char *plhandler; /* PL call handler function */ |
|
|
|
|
|
|
|
char *plcompiler; /* lancompiler text */ |
|
|
|
|
|
|
|
bool pltrusted; /* PL is trusted */ |
|
|
|
|
|
|
|
} CreatePLangStmt; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct DropPLangStmt |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
NodeTag type; |
|
|
|
|
|
|
|
char *plname; /* PL name */ |
|
|
|
|
|
|
|
} DropPLangStmt; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Create SEQUENCE Statement |
|
|
|
* Create SEQUENCE Statement |
|
|
@ -197,7 +218,7 @@ typedef struct CreateSeqStmt |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *seqname; /* the relation to create */ |
|
|
|
char *seqname; /* the relation to create */ |
|
|
|
List *options; |
|
|
|
List *options; |
|
|
|
} CreateSeqStmt; |
|
|
|
} CreateSeqStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Create Version Statement |
|
|
|
* Create Version Statement |
|
|
@ -210,7 +231,7 @@ typedef struct VersionStmt |
|
|
|
int direction; /* FORWARD | BACKWARD */ |
|
|
|
int direction; /* FORWARD | BACKWARD */ |
|
|
|
char *fromRelname; /* relation to create a version */ |
|
|
|
char *fromRelname; /* relation to create a version */ |
|
|
|
char *date; /* date of the snapshot */ |
|
|
|
char *date; /* date of the snapshot */ |
|
|
|
} VersionStmt; |
|
|
|
} VersionStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Create {Operator|Type|Aggregate} Statement |
|
|
|
* Create {Operator|Type|Aggregate} Statement |
|
|
@ -222,7 +243,7 @@ typedef struct DefineStmt |
|
|
|
int defType; /* OPERATOR|P_TYPE|AGGREGATE */ |
|
|
|
int defType; /* OPERATOR|P_TYPE|AGGREGATE */ |
|
|
|
char *defname; |
|
|
|
char *defname; |
|
|
|
List *definition; /* a list of DefElem */ |
|
|
|
List *definition; /* a list of DefElem */ |
|
|
|
} DefineStmt; |
|
|
|
} DefineStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Drop Table Statement |
|
|
|
* Drop Table Statement |
|
|
@ -233,7 +254,7 @@ typedef struct DestroyStmt |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
List *relNames; /* relations to be dropped */ |
|
|
|
List *relNames; /* relations to be dropped */ |
|
|
|
bool sequence; |
|
|
|
bool sequence; |
|
|
|
} DestroyStmt; |
|
|
|
} DestroyStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Extend Index Statement |
|
|
|
* Extend Index Statement |
|
|
@ -246,7 +267,7 @@ typedef struct ExtendStmt |
|
|
|
Node *whereClause; /* qualifications */ |
|
|
|
Node *whereClause; /* qualifications */ |
|
|
|
List *rangetable; /* range table, filled in by
|
|
|
|
List *rangetable; /* range table, filled in by
|
|
|
|
* transformStmt() */ |
|
|
|
* transformStmt() */ |
|
|
|
} ExtendStmt; |
|
|
|
} ExtendStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Begin Recipe Statement |
|
|
|
* Begin Recipe Statement |
|
|
@ -256,7 +277,7 @@ typedef struct RecipeStmt |
|
|
|
{ |
|
|
|
{ |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *recipeName; /* name of the recipe */ |
|
|
|
char *recipeName; /* name of the recipe */ |
|
|
|
} RecipeStmt; |
|
|
|
} RecipeStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Fetch Statement |
|
|
|
* Fetch Statement |
|
|
@ -269,7 +290,7 @@ typedef struct FetchStmt |
|
|
|
int howMany; /* amount to fetch ("ALL" --> 0) */ |
|
|
|
int howMany; /* amount to fetch ("ALL" --> 0) */ |
|
|
|
char *portalname; /* name of portal (cursor) */ |
|
|
|
char *portalname; /* name of portal (cursor) */ |
|
|
|
bool ismove; /* TRUE if MOVE */ |
|
|
|
bool ismove; /* TRUE if MOVE */ |
|
|
|
} FetchStmt; |
|
|
|
} FetchStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Create Index Statement |
|
|
|
* Create Index Statement |
|
|
@ -288,7 +309,7 @@ typedef struct IndexStmt |
|
|
|
* transformStmt() */ |
|
|
|
* transformStmt() */ |
|
|
|
bool *lossy; /* is index lossy? */ |
|
|
|
bool *lossy; /* is index lossy? */ |
|
|
|
bool unique; /* is index unique? */ |
|
|
|
bool unique; /* is index unique? */ |
|
|
|
} IndexStmt; |
|
|
|
} IndexStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Create Function Statement |
|
|
|
* Create Function Statement |
|
|
@ -305,7 +326,7 @@ typedef struct ProcedureStmt |
|
|
|
List *withClause; /* a list of ParamString */ |
|
|
|
List *withClause; /* a list of ParamString */ |
|
|
|
char *as; /* the SQL statement or filename */ |
|
|
|
char *as; /* the SQL statement or filename */ |
|
|
|
char *language; /* C or SQL */ |
|
|
|
char *language; /* C or SQL */ |
|
|
|
} ProcedureStmt; |
|
|
|
} ProcedureStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Purge Statement |
|
|
|
* Purge Statement |
|
|
@ -317,7 +338,7 @@ typedef struct PurgeStmt |
|
|
|
char *relname; /* relation to purge */ |
|
|
|
char *relname; /* relation to purge */ |
|
|
|
char *beforeDate; /* purge before this date */ |
|
|
|
char *beforeDate; /* purge before this date */ |
|
|
|
char *afterDate; /* purge after this date */ |
|
|
|
char *afterDate; /* purge after this date */ |
|
|
|
} PurgeStmt; |
|
|
|
} PurgeStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Drop Aggregate Statement |
|
|
|
* Drop Aggregate Statement |
|
|
@ -328,7 +349,7 @@ typedef struct RemoveAggrStmt |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *aggname; /* aggregate to drop */ |
|
|
|
char *aggname; /* aggregate to drop */ |
|
|
|
char *aggtype; /* for this type */ |
|
|
|
char *aggtype; /* for this type */ |
|
|
|
} RemoveAggrStmt; |
|
|
|
} RemoveAggrStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Drop Function Statement |
|
|
|
* Drop Function Statement |
|
|
@ -339,7 +360,7 @@ typedef struct RemoveFuncStmt |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *funcname; /* function to drop */ |
|
|
|
char *funcname; /* function to drop */ |
|
|
|
List *args; /* types of the arguments */ |
|
|
|
List *args; /* types of the arguments */ |
|
|
|
} RemoveFuncStmt; |
|
|
|
} RemoveFuncStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Drop Operator Statement |
|
|
|
* Drop Operator Statement |
|
|
@ -350,7 +371,7 @@ typedef struct RemoveOperStmt |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *opname; /* operator to drop */ |
|
|
|
char *opname; /* operator to drop */ |
|
|
|
List *args; /* types of the arguments */ |
|
|
|
List *args; /* types of the arguments */ |
|
|
|
} RemoveOperStmt; |
|
|
|
} RemoveOperStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Drop {Type|Index|Rule|View} Statement |
|
|
|
* Drop {Type|Index|Rule|View} Statement |
|
|
@ -361,7 +382,7 @@ typedef struct RemoveStmt |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
int removeType; /* P_TYPE|INDEX|RULE|VIEW */ |
|
|
|
int removeType; /* P_TYPE|INDEX|RULE|VIEW */ |
|
|
|
char *name; /* name to drop */ |
|
|
|
char *name; /* name to drop */ |
|
|
|
} RemoveStmt; |
|
|
|
} RemoveStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Alter Table Statement |
|
|
|
* Alter Table Statement |
|
|
@ -376,7 +397,7 @@ typedef struct RenameStmt |
|
|
|
* the new name. Otherwise, rename this |
|
|
|
* the new name. Otherwise, rename this |
|
|
|
* column name. */ |
|
|
|
* column name. */ |
|
|
|
char *newname; /* the new name */ |
|
|
|
char *newname; /* the new name */ |
|
|
|
} RenameStmt; |
|
|
|
} RenameStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Create Rule Statement |
|
|
|
* Create Rule Statement |
|
|
@ -391,7 +412,7 @@ typedef struct RuleStmt |
|
|
|
struct Attr *object; /* object affected */ |
|
|
|
struct Attr *object; /* object affected */ |
|
|
|
bool instead; /* is a 'do instead'? */ |
|
|
|
bool instead; /* is a 'do instead'? */ |
|
|
|
List *actions; /* the action statements */ |
|
|
|
List *actions; /* the action statements */ |
|
|
|
} RuleStmt; |
|
|
|
} RuleStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Notify Statement |
|
|
|
* Notify Statement |
|
|
@ -401,7 +422,7 @@ typedef struct NotifyStmt |
|
|
|
{ |
|
|
|
{ |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *relname; /* relation to notify */ |
|
|
|
char *relname; /* relation to notify */ |
|
|
|
} NotifyStmt; |
|
|
|
} NotifyStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Listen Statement |
|
|
|
* Listen Statement |
|
|
@ -411,7 +432,7 @@ typedef struct ListenStmt |
|
|
|
{ |
|
|
|
{ |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *relname; /* relation to listen on */ |
|
|
|
char *relname; /* relation to listen on */ |
|
|
|
} ListenStmt; |
|
|
|
} ListenStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* {Begin|Abort|End} Transaction Statement |
|
|
|
* {Begin|Abort|End} Transaction Statement |
|
|
@ -421,7 +442,7 @@ typedef struct TransactionStmt |
|
|
|
{ |
|
|
|
{ |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
int command; /* BEGIN|END|ABORT */ |
|
|
|
int command; /* BEGIN|END|ABORT */ |
|
|
|
} TransactionStmt; |
|
|
|
} TransactionStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Create View Statement |
|
|
|
* Create View Statement |
|
|
@ -432,7 +453,7 @@ typedef struct ViewStmt |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *viewname; /* name of the view */ |
|
|
|
char *viewname; /* name of the view */ |
|
|
|
Query *query; /* the SQL statement */ |
|
|
|
Query *query; /* the SQL statement */ |
|
|
|
} ViewStmt; |
|
|
|
} ViewStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Load Statement |
|
|
|
* Load Statement |
|
|
@ -442,7 +463,7 @@ typedef struct LoadStmt |
|
|
|
{ |
|
|
|
{ |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *filename; /* file to load */ |
|
|
|
char *filename; /* file to load */ |
|
|
|
} LoadStmt; |
|
|
|
} LoadStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Createdb Statement |
|
|
|
* Createdb Statement |
|
|
@ -452,7 +473,7 @@ typedef struct CreatedbStmt |
|
|
|
{ |
|
|
|
{ |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *dbname; /* database to create */ |
|
|
|
char *dbname; /* database to create */ |
|
|
|
} CreatedbStmt; |
|
|
|
} CreatedbStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Destroydb Statement |
|
|
|
* Destroydb Statement |
|
|
@ -462,7 +483,7 @@ typedef struct DestroydbStmt |
|
|
|
{ |
|
|
|
{ |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *dbname; /* database to drop */ |
|
|
|
char *dbname; /* database to drop */ |
|
|
|
} DestroydbStmt; |
|
|
|
} DestroydbStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Cluster Statement (support pbrown's cluster index implementation) |
|
|
|
* Cluster Statement (support pbrown's cluster index implementation) |
|
|
@ -473,7 +494,7 @@ typedef struct ClusterStmt |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *relname; /* relation being indexed */ |
|
|
|
char *relname; /* relation being indexed */ |
|
|
|
char *indexname; /* original index defined */ |
|
|
|
char *indexname; /* original index defined */ |
|
|
|
} ClusterStmt; |
|
|
|
} ClusterStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Vacuum Statement |
|
|
|
* Vacuum Statement |
|
|
@ -486,7 +507,7 @@ typedef struct VacuumStmt |
|
|
|
bool analyze; /* analyze data */ |
|
|
|
bool analyze; /* analyze data */ |
|
|
|
char *vacrel; /* table to vacuum */ |
|
|
|
char *vacrel; /* table to vacuum */ |
|
|
|
List *va_spec; /* columns to analyse */ |
|
|
|
List *va_spec; /* columns to analyse */ |
|
|
|
} VacuumStmt; |
|
|
|
} VacuumStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Explain Statement |
|
|
|
* Explain Statement |
|
|
@ -497,7 +518,7 @@ typedef struct ExplainStmt |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
Query *query; /* the query */ |
|
|
|
Query *query; /* the query */ |
|
|
|
bool verbose; /* print plan info */ |
|
|
|
bool verbose; /* print plan info */ |
|
|
|
} ExplainStmt; |
|
|
|
} ExplainStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Set Statement |
|
|
|
* Set Statement |
|
|
@ -509,7 +530,7 @@ typedef struct VariableSetStmt |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *name; |
|
|
|
char *name; |
|
|
|
char *value; |
|
|
|
char *value; |
|
|
|
} VariableSetStmt; |
|
|
|
} VariableSetStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Show Statement |
|
|
|
* Show Statement |
|
|
@ -520,7 +541,7 @@ typedef struct VariableShowStmt |
|
|
|
{ |
|
|
|
{ |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *name; |
|
|
|
char *name; |
|
|
|
} VariableShowStmt; |
|
|
|
} VariableShowStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Reset Statement |
|
|
|
* Reset Statement |
|
|
@ -531,7 +552,7 @@ typedef struct VariableResetStmt |
|
|
|
{ |
|
|
|
{ |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *name; |
|
|
|
char *name; |
|
|
|
} VariableResetStmt; |
|
|
|
} VariableResetStmt; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
/*****************************************************************************
|
|
|
@ -561,7 +582,7 @@ typedef struct DeleteStmt |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *relname; /* relation to delete from */ |
|
|
|
char *relname; /* relation to delete from */ |
|
|
|
Node *whereClause; /* qualifications */ |
|
|
|
Node *whereClause; /* qualifications */ |
|
|
|
} DeleteStmt; |
|
|
|
} DeleteStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Update Statement |
|
|
|
* Update Statement |
|
|
@ -574,7 +595,7 @@ typedef struct ReplaceStmt |
|
|
|
List *targetList; /* the target list (of ResTarget) */ |
|
|
|
List *targetList; /* the target list (of ResTarget) */ |
|
|
|
Node *whereClause; /* qualifications */ |
|
|
|
Node *whereClause; /* qualifications */ |
|
|
|
List *fromClause; /* the from clause */ |
|
|
|
List *fromClause; /* the from clause */ |
|
|
|
} ReplaceStmt; |
|
|
|
} ReplaceStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Create Cursor Statement |
|
|
|
* Create Cursor Statement |
|
|
@ -591,7 +612,7 @@ typedef struct CursorStmt |
|
|
|
Node *whereClause; /* qualifications */ |
|
|
|
Node *whereClause; /* qualifications */ |
|
|
|
List *groupClause; /* group by clause */ |
|
|
|
List *groupClause; /* group by clause */ |
|
|
|
List *sortClause; /* sort clause (a list of SortGroupBy's) */ |
|
|
|
List *sortClause; /* sort clause (a list of SortGroupBy's) */ |
|
|
|
} CursorStmt; |
|
|
|
} CursorStmt; |
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------
|
|
|
|
/* ----------------------
|
|
|
|
* Select Statement |
|
|
|
* Select Statement |
|
|
@ -609,7 +630,7 @@ typedef struct RetrieveStmt |
|
|
|
Node *havingClause; /* having conditional-expression */ |
|
|
|
Node *havingClause; /* having conditional-expression */ |
|
|
|
List *selectClause; /* subselect parameters */ |
|
|
|
List *selectClause; /* subselect parameters */ |
|
|
|
List *sortClause; /* sort clause (a list of SortGroupBy's) */ |
|
|
|
List *sortClause; /* sort clause (a list of SortGroupBy's) */ |
|
|
|
} RetrieveStmt; |
|
|
|
} RetrieveStmt; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
/****************************************************************************
|
|
|
@ -628,7 +649,7 @@ typedef struct SubSelect |
|
|
|
Node *whereClause; /* qualifications */ |
|
|
|
Node *whereClause; /* qualifications */ |
|
|
|
List *groupClause; /* group by clause */ |
|
|
|
List *groupClause; /* group by clause */ |
|
|
|
Node *havingClause; /* having conditional-expression */ |
|
|
|
Node *havingClause; /* having conditional-expression */ |
|
|
|
} SubSelect; |
|
|
|
} SubSelect; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* TypeName - specifies a type in definitions |
|
|
|
* TypeName - specifies a type in definitions |
|
|
@ -641,7 +662,7 @@ typedef struct TypeName |
|
|
|
bool setof; /* is a set? */ |
|
|
|
bool setof; /* is a set? */ |
|
|
|
List *arrayBounds; /* array bounds */ |
|
|
|
List *arrayBounds; /* array bounds */ |
|
|
|
int typlen; /* length for char() and varchar() */ |
|
|
|
int typlen; /* length for char() and varchar() */ |
|
|
|
} TypeName; |
|
|
|
} TypeName; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* ParamNo - specifies a parameter reference |
|
|
|
* ParamNo - specifies a parameter reference |
|
|
@ -651,7 +672,7 @@ typedef struct ParamNo |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
int number; /* the number of the parameter */ |
|
|
|
int number; /* the number of the parameter */ |
|
|
|
TypeName *typename; /* the typecast */ |
|
|
|
TypeName *typename; /* the typecast */ |
|
|
|
} ParamNo; |
|
|
|
} ParamNo; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* A_Expr - binary expressions |
|
|
|
* A_Expr - binary expressions |
|
|
@ -702,7 +723,7 @@ typedef struct ColumnDef |
|
|
|
TypeName *typename; /* type of column */ |
|
|
|
TypeName *typename; /* type of column */ |
|
|
|
bool is_not_null; /* flag to NOT NULL constraint */ |
|
|
|
bool is_not_null; /* flag to NOT NULL constraint */ |
|
|
|
char *defval; /* default value of column */ |
|
|
|
char *defval; /* default value of column */ |
|
|
|
} ColumnDef; |
|
|
|
} ColumnDef; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Ident - |
|
|
|
* Ident - |
|
|
@ -718,7 +739,7 @@ typedef struct Ident |
|
|
|
List *indirection; /* array references */ |
|
|
|
List *indirection; /* array references */ |
|
|
|
bool isRel; /* is a relation - filled in by
|
|
|
|
bool isRel; /* is a relation - filled in by
|
|
|
|
* transformExpr() */ |
|
|
|
* transformExpr() */ |
|
|
|
} Ident; |
|
|
|
} Ident; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* FuncCall - a function/aggregate invocation |
|
|
|
* FuncCall - a function/aggregate invocation |
|
|
@ -728,7 +749,7 @@ typedef struct FuncCall |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *funcname; /* name of function */ |
|
|
|
char *funcname; /* name of function */ |
|
|
|
List *args; /* the arguments (list of exprs) */ |
|
|
|
List *args; /* the arguments (list of exprs) */ |
|
|
|
} FuncCall; |
|
|
|
} FuncCall; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* A_Indices - array reference or bounds ([lidx:uidx] or [uidx]) |
|
|
|
* A_Indices - array reference or bounds ([lidx:uidx] or [uidx]) |
|
|
@ -751,7 +772,7 @@ typedef struct ResTarget |
|
|
|
List *indirection; /* array references */ |
|
|
|
List *indirection; /* array references */ |
|
|
|
Node *val; /* the value of the result (A_Expr or
|
|
|
|
Node *val; /* the value of the result (A_Expr or
|
|
|
|
* Attr) (or A_Const) */ |
|
|
|
* Attr) (or A_Const) */ |
|
|
|
} ResTarget; |
|
|
|
} ResTarget; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* ParamString - used in with clauses |
|
|
|
* ParamString - used in with clauses |
|
|
@ -761,7 +782,7 @@ typedef struct ParamString |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *name; |
|
|
|
char *name; |
|
|
|
char *val; |
|
|
|
char *val; |
|
|
|
} ParamString; |
|
|
|
} ParamString; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* TimeRange - specifies a time range |
|
|
|
* TimeRange - specifies a time range |
|
|
@ -771,7 +792,7 @@ typedef struct TimeRange |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *startDate; |
|
|
|
char *startDate; |
|
|
|
char *endDate; /* snapshot if NULL */ |
|
|
|
char *endDate; /* snapshot if NULL */ |
|
|
|
} TimeRange; |
|
|
|
} TimeRange; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* RelExpr - relation expressions |
|
|
|
* RelExpr - relation expressions |
|
|
@ -782,7 +803,7 @@ typedef struct RelExpr |
|
|
|
char *relname; /* the relation name */ |
|
|
|
char *relname; /* the relation name */ |
|
|
|
bool inh; /* inheritance query */ |
|
|
|
bool inh; /* inheritance query */ |
|
|
|
TimeRange *timeRange; /* the time range */ |
|
|
|
TimeRange *timeRange; /* the time range */ |
|
|
|
} RelExpr; |
|
|
|
} RelExpr; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* SortGroupBy - for order by clause |
|
|
|
* SortGroupBy - for order by clause |
|
|
@ -794,7 +815,7 @@ typedef struct SortGroupBy |
|
|
|
char *range; |
|
|
|
char *range; |
|
|
|
char *name; /* name of column to sort on */ |
|
|
|
char *name; /* name of column to sort on */ |
|
|
|
char *useOp; /* operator to use */ |
|
|
|
char *useOp; /* operator to use */ |
|
|
|
} SortGroupBy; |
|
|
|
} SortGroupBy; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* RangeVar - range variable, used in from clauses |
|
|
|
* RangeVar - range variable, used in from clauses |
|
|
@ -804,7 +825,7 @@ typedef struct RangeVar |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
RelExpr *relExpr; /* the relation expression */ |
|
|
|
RelExpr *relExpr; /* the relation expression */ |
|
|
|
char *name; /* the name to be referenced (optional) */ |
|
|
|
char *name; /* the name to be referenced (optional) */ |
|
|
|
} RangeVar; |
|
|
|
} RangeVar; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* IndexElem - index parameters (used in create index) |
|
|
|
* IndexElem - index parameters (used in create index) |
|
|
@ -816,7 +837,7 @@ typedef struct IndexElem |
|
|
|
List *args; /* if not NULL, function index */ |
|
|
|
List *args; /* if not NULL, function index */ |
|
|
|
char *class; |
|
|
|
char *class; |
|
|
|
TypeName *tname; /* type of index's keys (optional) */ |
|
|
|
TypeName *tname; /* type of index's keys (optional) */ |
|
|
|
} IndexElem; |
|
|
|
} IndexElem; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* DefElem - |
|
|
|
* DefElem - |
|
|
@ -827,7 +848,7 @@ typedef struct DefElem |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
char *defname; |
|
|
|
char *defname; |
|
|
|
Node *arg; /* a (Value *) or a (TypeName *) */ |
|
|
|
Node *arg; /* a (Value *) or a (TypeName *) */ |
|
|
|
} DefElem; |
|
|
|
} DefElem; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
/****************************************************************************
|
|
|
@ -847,7 +868,7 @@ typedef struct TargetEntry |
|
|
|
Resdom *resdom; /* fjoin overload this to be a list?? */ |
|
|
|
Resdom *resdom; /* fjoin overload this to be a list?? */ |
|
|
|
Fjoin *fjoin; |
|
|
|
Fjoin *fjoin; |
|
|
|
Node *expr; /* can be a list too */ |
|
|
|
Node *expr; /* can be a list too */ |
|
|
|
} TargetEntry; |
|
|
|
} TargetEntry; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* RangeTblEntry - |
|
|
|
* RangeTblEntry - |
|
|
@ -873,7 +894,7 @@ typedef struct RangeTblEntry |
|
|
|
bool archive; /* filled in by plan_archive */ |
|
|
|
bool archive; /* filled in by plan_archive */ |
|
|
|
bool inFromCl; /* comes from From Clause */ |
|
|
|
bool inFromCl; /* comes from From Clause */ |
|
|
|
TimeQual timeQual; /* filled in by pg_plan */ |
|
|
|
TimeQual timeQual; /* filled in by pg_plan */ |
|
|
|
} RangeTblEntry; |
|
|
|
} RangeTblEntry; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* SortClause - |
|
|
|
* SortClause - |
|
|
@ -884,7 +905,7 @@ typedef struct SortClause |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
Resdom *resdom; /* attributes in tlist to be sorted */ |
|
|
|
Resdom *resdom; /* attributes in tlist to be sorted */ |
|
|
|
Oid opoid; /* sort operators */ |
|
|
|
Oid opoid; /* sort operators */ |
|
|
|
} SortClause; |
|
|
|
} SortClause; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* GroupClause - |
|
|
|
* GroupClause - |
|
|
@ -895,6 +916,6 @@ typedef struct GroupClause |
|
|
|
NodeTag type; |
|
|
|
NodeTag type; |
|
|
|
TargetEntry *entry; /* attributes to group on */ |
|
|
|
TargetEntry *entry; /* attributes to group on */ |
|
|
|
Oid grpOpoid; /* the sort operator to use */ |
|
|
|
Oid grpOpoid; /* the sort operator to use */ |
|
|
|
} GroupClause; |
|
|
|
} GroupClause; |
|
|
|
|
|
|
|
|
|
|
|
#endif /* PARSENODES_H */ |
|
|
|
#endif /* PARSENODES_H */ |
|
|
|