⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parsenodes.h

📁 关系型数据库 Postgresql 6.5.2
💻 H
📖 第 1 页 / 共 2 页
字号:
	char	   *filename;		/* file to load */} LoadStmt;/* ---------------------- *		Createdb Statement * ---------------------- */typedef struct CreatedbStmt{	NodeTag		type;	char	   *dbname;			/* database to create */	char	   *dbpath;			/* location of database */	int			encoding;		/* default encoding (see regex/pg_wchar.h) */} CreatedbStmt;/* ---------------------- *		Destroydb Statement * ---------------------- */typedef struct DestroydbStmt{	NodeTag		type;	char	   *dbname;			/* database to drop */} DestroydbStmt;/* ---------------------- *		Cluster Statement (support pbrown's cluster index implementation) * ---------------------- */typedef struct ClusterStmt{	NodeTag		type;	char	   *relname;		/* relation being indexed */	char	   *indexname;		/* original index defined */} ClusterStmt;/* ---------------------- *		Vacuum Statement * ---------------------- */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;/* ---------------------- *		Explain Statement * ---------------------- */typedef struct ExplainStmt{	NodeTag		type;	Query	   *query;			/* the query */	bool		verbose;		/* print plan info */} ExplainStmt;/* ---------------------- * Set Statement * ---------------------- */typedef struct VariableSetStmt{	NodeTag		type;	char	   *name;	char	   *value;} VariableSetStmt;/* ---------------------- * Show Statement * ---------------------- */typedef struct VariableShowStmt{	NodeTag		type;	char	   *name;} VariableShowStmt;/* ---------------------- * Reset Statement * ---------------------- */typedef struct VariableResetStmt{	NodeTag		type;	char	   *name;} VariableResetStmt;/* ---------------------- *		LOCK Statement * ---------------------- */typedef struct LockStmt{	NodeTag		type;	char	   *relname;		/* relation to lock */	int			mode;			/* lock mode */} LockStmt;/***************************************************************************** *		Optimizable Statements *****************************************************************************//* ---------------------- *		Insert Statement * ---------------------- */typedef struct InsertStmt{	NodeTag		type;	char	   *relname;		/* relation to insert into */	char	   *unique;			/* NULL, '*', or unique attribute name */	List	   *cols;			/* names of the columns */	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	   *unionClause;	/* union subselect parameters */	bool		unionall;		/* union without unique sort */	/***S*I***/	List	   *intersectClause;	List	   *forUpdate;		/* FOR UPDATE clause */} InsertStmt;/* ---------------------- *		Delete Statement * ---------------------- */typedef struct DeleteStmt{	NodeTag		type;	char	   *relname;		/* relation to delete from */	Node	   *whereClause;	/* qualifications */} DeleteStmt;/* ---------------------- *		Update Statement * ---------------------- */typedef struct UpdateStmt{	NodeTag		type;	char	   *relname;		/* relation to update */	List	   *targetList;		/* the target list (of ResTarget) */	Node	   *whereClause;	/* qualifications */	List	   *fromClause;		/* the from clause */} UpdateStmt;/* ---------------------- *		Select Statement * ---------------------- */typedef struct SelectStmt{	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 */	/***S*I***/	List	   *intersectClause;	List	   *exceptClause;	List	   *unionClause;	/* union subselect parameters */	List	   *sortClause;		/* sort clause (a list of SortGroupBy's) */	char	   *portalname;		/* the portal (cursor) to create */	bool		binary;			/* a binary (internal) portal? */	bool		istemp;			/* into is a temp table */	bool		unionall;		/* union without unique sort */	Node	   *limitOffset;	/* # of result tuples to skip */	Node	   *limitCount;		/* # of result tuples to return */	List	   *forUpdate;		/* FOR UPDATE clause */} SelectStmt;/**************************************************************************** *	Supporting data structures for Parse Trees ****************************************************************************//* * 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? */	int32		typmod;			/* type modifier */	List	   *arrayBounds;	/* array bounds */} TypeName;/* * ParamNo - specifies a parameter reference */typedef struct ParamNo{	NodeTag		type;	int			number;			/* the number of the parameter */	TypeName   *typename;		/* the typecast */	List	   *indirection;	/* array references */} ParamNo;/* * A_Expr - binary expressions */typedef struct A_Expr{	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;/* * Attr - *	  specifies an Attribute (ie. a Column); could have nested dots or *	  array references. * */typedef struct Attr{	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;/* * A_Const - a constant expression */typedef struct A_Const{	NodeTag		type;	Value		val;			/* the value (with the tag) */	TypeName   *typename;		/* typecast */} A_Const;/* * CaseExpr - a CASE expression */typedef struct CaseExpr{	NodeTag		type;	Oid			casetype;	Node	   *arg;			/* implicit equality comparison argument */	List	   *args;			/* the arguments (list of WHEN clauses) */	Node	   *defresult;		/* the default result (ELSE clause) */} CaseExpr;/* * CaseWhen - an argument to a CASE expression */typedef struct CaseWhen{	NodeTag		type;	Node	   *expr;			/* comparison expression */	Node	   *result;			/* substitution result */} CaseWhen;/* * 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 */	bool		is_sequence;	/* is a sequence? */	char	   *defval;			/* default value of column */	List	   *constraints;	/* constraints on column */} ColumnDef;/* * Ident - *	  an identifier (could be an attribute or a relation name). Depending *	  on the context at transformStmt time, the identifier is treated as *	  either a relation name (in which case, isRel will be set) or an *	  attribute (in which case, it will be transformed into an Attr). */typedef struct Ident{	NodeTag		type;	char	   *name;			/* its name */	List	   *indirection;	/* array references */	bool		isRel;			/* is a relation - filled in by								 * transformExpr() */} Ident;/* * FuncCall - a function/aggregate invocation */typedef struct 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;/* * ResTarget - *	  result target (used in target list of pre-transformed Parse trees) */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								 * Attr) (or A_Const) */} ResTarget;/* * ParamString - used in WITH clauses */typedef struct ParamString{	NodeTag		type;	char	   *name;	char	   *val;} ParamString;/* * RelExpr - relation expressions */typedef struct RelExpr{	NodeTag		type;	char	   *relname;		/* the relation name */	bool		inh;			/* inheritance query */} RelExpr;/* * SortGroupBy - for ORDER BY clause */typedef struct SortGroupBy{	NodeTag		type;	char	   *useOp;			/* operator to use */	Node	   *node;			/* Expression  */} 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;/* * 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   *typename;		/* type of index's keys (optional) */} IndexElem;/* * DefElem - *	  a definition (used in definition lists in the form of defname = arg) */typedef struct DefElem{	NodeTag		type;	char	   *defname;	Node	   *arg;			/* a (Value *) or a (TypeName *) */} DefElem;/* * JoinExpr - for JOIN expressions */typedef struct JoinExpr{	NodeTag		type;	int			jointype;	RangeVar   *larg;	Node	   *rarg;	List	   *quals;} JoinExpr;/**************************************************************************** *	Nodes for a Query tree ****************************************************************************//* * TargetEntry - *	   a target  entry (used in the transformed target list) * * one of resdom or fjoin is not NULL. a target list is *		((<resdom | fjoin> expr) (<resdom | fjoin> expr) ...) */typedef struct TargetEntry{	NodeTag		type;	Resdom	   *resdom;			/* fjoin overload this to be a list?? */	Fjoin	   *fjoin;	Node	   *expr;			/* can be a list too */} TargetEntry;/* * RangeTblEntry - *	  used in range tables. Some of the following are only used in one of *	  the parsing, optimizing, execution stages. * *	  inFromCl marks those range variables that are listed in the from clause. *	  In SQL, the targetlist can only refer to range variables listed in the *	  from clause but POSTQUEL allows you to refer to tables not specified, in *	  which case a range table entry will be generated. We use POSTQUEL *	  semantics which is more powerful. However, we need SQL semantics in *	  some cases (eg. when expanding a '*') */typedef struct RangeTblEntry{	NodeTag		type;	char	   *relname;		/* real name of the relation */	char	   *refname;		/* the reference name (specified in the								 * from clause) */	Oid			relid;	bool		inh;			/* inheritance? */	bool		inFromCl;		/* comes from From Clause */	bool		skipAcl;		/* skip ACL check in executor */} RangeTblEntry;/* * SortClause - *	   used in the sort clause for retrieves and cursors */typedef struct SortClause{	NodeTag		type;	Resdom	   *resdom;			/* attributes in tlist to be sorted */	Oid			opoid;			/* sort operators */} SortClause;/* * GroupClause - *	   used in the GROUP BY clause */typedef struct GroupClause{	NodeTag		type;	Oid			grpOpoid;		/* the sort operator to use */	Index		tleGroupref;	/* reference into targetlist */} GroupClause;#define ROW_MARK_FOR_UPDATE		(1 << 0)#define ROW_ACL_FOR_UPDATE		(1 << 1)typedef struct RowMark{	NodeTag		type;	Index		rti;			/* index in Query->rtable */	bits8		info;			/* as above */} RowMark;#endif	 /* PARSENODES_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -