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

📄 copyfuncs.c

📁 PostgreSQL7.4.6 for Linux
💻 C
📖 第 1 页 / 共 4 页
字号:
	return newnode;}static DefElem *_copyDefElem(DefElem *from){	DefElem    *newnode = makeNode(DefElem);	COPY_STRING_FIELD(defname);	COPY_NODE_FIELD(arg);	return newnode;}static Query *_copyQuery(Query *from){	Query	   *newnode = makeNode(Query);	COPY_SCALAR_FIELD(commandType);	COPY_SCALAR_FIELD(querySource);	COPY_SCALAR_FIELD(canSetTag);	COPY_NODE_FIELD(utilityStmt);	COPY_SCALAR_FIELD(resultRelation);	COPY_NODE_FIELD(into);	COPY_SCALAR_FIELD(hasAggs);	COPY_SCALAR_FIELD(hasSubLinks);	COPY_NODE_FIELD(rtable);	COPY_NODE_FIELD(jointree);	COPY_INTLIST_FIELD(rowMarks);	COPY_NODE_FIELD(targetList);	COPY_NODE_FIELD(groupClause);	COPY_NODE_FIELD(havingQual);	COPY_NODE_FIELD(distinctClause);	COPY_NODE_FIELD(sortClause);	COPY_NODE_FIELD(limitOffset);	COPY_NODE_FIELD(limitCount);	COPY_NODE_FIELD(setOperations);	COPY_INTLIST_FIELD(resultRelations);	COPY_NODE_FIELD(in_info_list);	COPY_SCALAR_FIELD(hasJoinRTEs);	/*	 * We do not copy the other planner internal fields: base_rel_list,	 * other_rel_list, join_rel_list, equi_key_list, query_pathkeys. That	 * would get us into copying RelOptInfo/Path trees, which we don't	 * want to do.	It is necessary to copy in_info_list and hasJoinRTEs	 * for the benefit of inheritance_planner(), which may try to copy a	 * Query in which these are already set.	 */	return newnode;}static InsertStmt *_copyInsertStmt(InsertStmt *from){	InsertStmt *newnode = makeNode(InsertStmt);	COPY_NODE_FIELD(relation);	COPY_NODE_FIELD(cols);	COPY_NODE_FIELD(targetList);	COPY_NODE_FIELD(selectStmt);	return newnode;}static DeleteStmt *_copyDeleteStmt(DeleteStmt *from){	DeleteStmt *newnode = makeNode(DeleteStmt);	COPY_NODE_FIELD(relation);	COPY_NODE_FIELD(whereClause);	return newnode;}static UpdateStmt *_copyUpdateStmt(UpdateStmt *from){	UpdateStmt *newnode = makeNode(UpdateStmt);	COPY_NODE_FIELD(relation);	COPY_NODE_FIELD(targetList);	COPY_NODE_FIELD(whereClause);	COPY_NODE_FIELD(fromClause);	return newnode;}static SelectStmt *_copySelectStmt(SelectStmt *from){	SelectStmt *newnode = makeNode(SelectStmt);	COPY_NODE_FIELD(distinctClause);	COPY_NODE_FIELD(into);	COPY_NODE_FIELD(intoColNames);	COPY_NODE_FIELD(targetList);	COPY_NODE_FIELD(fromClause);	COPY_NODE_FIELD(whereClause);	COPY_NODE_FIELD(groupClause);	COPY_NODE_FIELD(havingClause);	COPY_NODE_FIELD(sortClause);	COPY_NODE_FIELD(limitOffset);	COPY_NODE_FIELD(limitCount);	COPY_NODE_FIELD(forUpdate);	COPY_SCALAR_FIELD(op);	COPY_SCALAR_FIELD(all);	COPY_NODE_FIELD(larg);	COPY_NODE_FIELD(rarg);	return newnode;}static SetOperationStmt *_copySetOperationStmt(SetOperationStmt *from){	SetOperationStmt *newnode = makeNode(SetOperationStmt);	COPY_SCALAR_FIELD(op);	COPY_SCALAR_FIELD(all);	COPY_NODE_FIELD(larg);	COPY_NODE_FIELD(rarg);	COPY_OIDLIST_FIELD(colTypes);	return newnode;}static AlterTableStmt *_copyAlterTableStmt(AlterTableStmt *from){	AlterTableStmt *newnode = makeNode(AlterTableStmt);	COPY_SCALAR_FIELD(subtype);	COPY_NODE_FIELD(relation);	COPY_STRING_FIELD(name);	COPY_NODE_FIELD(def);	COPY_SCALAR_FIELD(behavior);	return newnode;}static AlterDomainStmt *_copyAlterDomainStmt(AlterDomainStmt *from){	AlterDomainStmt *newnode = makeNode(AlterDomainStmt);	COPY_SCALAR_FIELD(subtype);	COPY_NODE_FIELD(typename);	COPY_STRING_FIELD(name);	COPY_NODE_FIELD(def);	COPY_SCALAR_FIELD(behavior);	return newnode;}static GrantStmt *_copyGrantStmt(GrantStmt *from){	GrantStmt  *newnode = makeNode(GrantStmt);	COPY_SCALAR_FIELD(is_grant);	COPY_SCALAR_FIELD(objtype);	COPY_NODE_FIELD(objects);	COPY_INTLIST_FIELD(privileges);	COPY_NODE_FIELD(grantees);	COPY_SCALAR_FIELD(grant_option);	COPY_SCALAR_FIELD(behavior);	return newnode;}static PrivGrantee *_copyPrivGrantee(PrivGrantee *from){	PrivGrantee *newnode = makeNode(PrivGrantee);	COPY_STRING_FIELD(username);	COPY_STRING_FIELD(groupname);	return newnode;}static FuncWithArgs *_copyFuncWithArgs(FuncWithArgs *from){	FuncWithArgs *newnode = makeNode(FuncWithArgs);	COPY_NODE_FIELD(funcname);	COPY_NODE_FIELD(funcargs);	return newnode;}static DeclareCursorStmt *_copyDeclareCursorStmt(DeclareCursorStmt *from){	DeclareCursorStmt *newnode = makeNode(DeclareCursorStmt);	COPY_STRING_FIELD(portalname);	COPY_SCALAR_FIELD(options);	COPY_NODE_FIELD(query);	return newnode;}static ClosePortalStmt *_copyClosePortalStmt(ClosePortalStmt *from){	ClosePortalStmt *newnode = makeNode(ClosePortalStmt);	COPY_STRING_FIELD(portalname);	return newnode;}static ClusterStmt *_copyClusterStmt(ClusterStmt *from){	ClusterStmt *newnode = makeNode(ClusterStmt);	COPY_NODE_FIELD(relation);	COPY_STRING_FIELD(indexname);	return newnode;}static CopyStmt *_copyCopyStmt(CopyStmt *from){	CopyStmt   *newnode = makeNode(CopyStmt);	COPY_NODE_FIELD(relation);	COPY_NODE_FIELD(attlist);	COPY_SCALAR_FIELD(is_from);	COPY_STRING_FIELD(filename);	COPY_NODE_FIELD(options);	return newnode;}static CreateStmt *_copyCreateStmt(CreateStmt *from){	CreateStmt *newnode = makeNode(CreateStmt);	COPY_NODE_FIELD(relation);	COPY_NODE_FIELD(tableElts);	COPY_NODE_FIELD(inhRelations);	COPY_NODE_FIELD(constraints);	COPY_SCALAR_FIELD(hasoids);	COPY_SCALAR_FIELD(oncommit);	return newnode;}static InhRelation *_copyInhRelation(InhRelation *from){	InhRelation *newnode = makeNode(InhRelation);	COPY_NODE_FIELD(relation);	COPY_SCALAR_FIELD(including_defaults);	return newnode;}static DefineStmt *_copyDefineStmt(DefineStmt *from){	DefineStmt *newnode = makeNode(DefineStmt);	COPY_SCALAR_FIELD(kind);	COPY_NODE_FIELD(defnames);	COPY_NODE_FIELD(definition);	return newnode;}static DropStmt *_copyDropStmt(DropStmt *from){	DropStmt   *newnode = makeNode(DropStmt);	COPY_NODE_FIELD(objects);	COPY_SCALAR_FIELD(removeType);	COPY_SCALAR_FIELD(behavior);	return newnode;}static TruncateStmt *_copyTruncateStmt(TruncateStmt *from){	TruncateStmt *newnode = makeNode(TruncateStmt);	COPY_NODE_FIELD(relation);	return newnode;}static CommentStmt *_copyCommentStmt(CommentStmt *from){	CommentStmt *newnode = makeNode(CommentStmt);	COPY_SCALAR_FIELD(objtype);	COPY_NODE_FIELD(objname);	COPY_NODE_FIELD(objargs);	COPY_STRING_FIELD(comment);	return newnode;}static FetchStmt *_copyFetchStmt(FetchStmt *from){	FetchStmt  *newnode = makeNode(FetchStmt);	COPY_SCALAR_FIELD(direction);	COPY_SCALAR_FIELD(howMany);	COPY_STRING_FIELD(portalname);	COPY_SCALAR_FIELD(ismove);	return newnode;}static IndexStmt *_copyIndexStmt(IndexStmt *from){	IndexStmt  *newnode = makeNode(IndexStmt);	COPY_STRING_FIELD(idxname);	COPY_NODE_FIELD(relation);	COPY_STRING_FIELD(accessMethod);	COPY_NODE_FIELD(indexParams);	COPY_NODE_FIELD(whereClause);	COPY_NODE_FIELD(rangetable);	COPY_SCALAR_FIELD(unique);	COPY_SCALAR_FIELD(primary);	COPY_SCALAR_FIELD(isconstraint);	return newnode;}static CreateFunctionStmt *_copyCreateFunctionStmt(CreateFunctionStmt *from){	CreateFunctionStmt *newnode = makeNode(CreateFunctionStmt);	COPY_SCALAR_FIELD(replace);	COPY_NODE_FIELD(funcname);	COPY_NODE_FIELD(argTypes);	COPY_NODE_FIELD(returnType);	COPY_NODE_FIELD(options);	COPY_NODE_FIELD(withClause);	return newnode;}static RemoveAggrStmt *_copyRemoveAggrStmt(RemoveAggrStmt *from){	RemoveAggrStmt *newnode = makeNode(RemoveAggrStmt);	COPY_NODE_FIELD(aggname);	COPY_NODE_FIELD(aggtype);	COPY_SCALAR_FIELD(behavior);	return newnode;}static RemoveFuncStmt *_copyRemoveFuncStmt(RemoveFuncStmt *from){	RemoveFuncStmt *newnode = makeNode(RemoveFuncStmt);	COPY_NODE_FIELD(funcname);	COPY_NODE_FIELD(args);	COPY_SCALAR_FIELD(behavior);	return newnode;}static RemoveOperStmt *_copyRemoveOperStmt(RemoveOperStmt *from){	RemoveOperStmt *newnode = makeNode(RemoveOperStmt);	COPY_NODE_FIELD(opname);	COPY_NODE_FIELD(args);	COPY_SCALAR_FIELD(behavior);	return newnode;}static RemoveOpClassStmt *_copyRemoveOpClassStmt(RemoveOpClassStmt *from){	RemoveOpClassStmt *newnode = makeNode(RemoveOpClassStmt);	COPY_NODE_FIELD(opclassname);	COPY_STRING_FIELD(amname);	COPY_SCALAR_FIELD(behavior);	return newnode;}static RenameStmt *_copyRenameStmt(RenameStmt *from){	RenameStmt *newnode = makeNode(RenameStmt);	COPY_NODE_FIELD(relation);	COPY_NODE_FIELD(object);	COPY_NODE_FIELD(objarg);	COPY_STRING_FIELD(subname);	COPY_STRING_FIELD(newname);	COPY_SCALAR_FIELD(renameType);	return newnode;}static RuleStmt *_copyRuleStmt(RuleStmt *from){	RuleStmt   *newnode = makeNode(RuleStmt);	COPY_NODE_FIELD(relation);	COPY_STRING_FIELD(rulename);	COPY_NODE_FIELD(whereClause);	COPY_SCALAR_FIELD(event);	COPY_SCALAR_FIELD(instead);	COPY_NODE_FIELD(actions);	COPY_SCALAR_FIELD(replace);	return newnode;}static NotifyStmt *_copyNotifyStmt(NotifyStmt *from){	NotifyStmt *newnode = makeNode(NotifyStmt);	COPY_NODE_FIELD(relation);	return newnode;}static ListenStmt *_copyListenStmt(ListenStmt *from){	ListenStmt *newnode = makeNode(ListenStmt);	COPY_NODE_FIELD(relation);	return newnode;}static UnlistenStmt *_copyUnlistenStmt(UnlistenStmt *from){	UnlistenStmt *newnode = makeNode(UnlistenStmt);	COPY_NODE_FIELD(relation);	return newnode;}static TransactionStmt *_copyTransactionStmt(TransactionStmt *from){	TransactionStmt *newnode = makeNode(TransactionStmt);	COPY_SCALAR_FIELD(kind);	COPY_NODE_FIELD(options);	return newnode;}static CompositeTypeStmt *_copyCompositeTypeStmt(CompositeTypeStmt *from){	CompositeTypeStmt *newnode = makeNode(CompositeTypeStmt);	COPY_NODE_FIELD(typevar);	COPY_NODE_FIELD(coldeflist);	return newnode;}static ViewStmt *_copyViewStmt(ViewStmt *from){	ViewStmt   *newnode = makeNode(ViewStmt);	COPY_NODE_FIELD(view);	COPY_NODE_FIELD(aliases);	COPY_NODE_FIELD(query);	COPY_SCALAR_FIELD(replace);	return newnode;}static LoadStmt *_copyLoadStmt(LoadStmt *from){	LoadStmt   *newnode = makeNode(LoadStmt);	COPY_STRING_FIELD(filename);	return newnode;}static CreateDomainStmt *_copyCreateDomainStmt(CreateDomainStmt *from){	CreateDomainStmt *newnode = makeNode(CreateDomainStmt);	COPY_NODE_FIELD(domainname);	COPY_NODE_FIELD(typename);	COPY_NODE_FIELD(constraints);	return newnode;}static CreateOpClassStmt *_copyCreateOpClassStmt(CreateOpClassStmt *from){	CreateOpClassStmt *newnode = makeNode(CreateOpClassStmt);	COPY_NODE_FIELD(opclassname);	COPY_STRING_FIELD(amname);	COPY_NODE_FIELD(datatype);	COPY_NODE_FIELD(items);	COPY_SCALAR_FIELD(isDefault);	return newnode;}static CreateOpClassItem *_copyCreateOpClassItem(CreateOpClassItem *from){	CreateOpClassItem *newnode = makeNode(CreateOpClassItem);	COPY_SCALAR_FIELD(itemtype);	COPY_NODE_FIELD(name);	COPY_NODE_FIELD(args);	COPY_SCALAR_FIELD(number);	COPY_SCALAR_FIELD(recheck);	COPY_NODE_FIELD(storedtype);	return newnode;}static CreatedbStmt *_copyCreatedbStmt(CreatedbStmt *from){	CreatedbStmt *newnode = makeNode(CreatedbStmt);	COPY_STRING_FIELD(dbname);	COPY_NODE_FIELD(options);	return newnode;}static AlterDatabaseSetStmt *_copyAlterDatabaseSetStmt(AlterDatabaseSetStmt *from){	AlterDatabaseSetStmt *newnode = makeNode(AlterDatabaseSetStmt);	COPY_STRING_FIELD(dbname);	COPY_STRING_FIELD(variable);	COPY_NODE_FIELD(value);	return newnode;}static DropdbStmt *_copyDropdbStmt(DropdbStmt *from){	DropdbStmt *newnode = makeNode(DropdbStmt);	COPY_STRING_FIELD(dbname);	return newnode;}static VacuumStmt *_copyVacuumStmt(VacuumStmt *from){	VacuumStmt *newnode = makeNode(VacuumStmt);	COPY_SCALAR_FIELD(vacuum);	COPY_SCALAR_FIELD(full);	COPY_SCALAR_FIELD(analyze);	COPY_SCALAR_FIELD(freeze);	COPY_SCALAR_FIELD(verbose);	COPY_NODE_FIELD(relation);	COPY_NODE_FIELD(va_cols);	return newnode;}static ExplainStmt *_copyExplainStmt(ExplainStmt *from){	ExplainStmt *newnode = makeNode(ExplainStmt);	COPY_NODE_FIELD(query);	COPY_SCALAR_FIELD(verbose);	COPY_SCALAR_FIELD(analyze);	return newnode;}static CreateSeqStmt *_copyCreateSeqStmt(CreateSeqStmt *from){	CreateSeqStmt *newnode = makeNode(CreateSeqStmt);	COPY_NODE_FIELD(sequence);	COPY_NODE_FIELD(options);	return newnode;}static AlterSeqStmt *_copyAlterSeqStmt(AlterSeqStmt *from){	AlterSeqStmt *newnode = makeNode(AlterSeqStmt);	COPY_NODE_FIELD(sequence);	COPY_NODE_FIELD(options);	return newnode;}static VariableSetStmt *_copyVariableSetStmt(VariableSetStmt *from){	VariableSetStmt *newnode = makeNode(VariableSetStmt);	COPY_STRING_FIELD(name);	COPY_NODE_FIELD(args);	COPY_SCALAR_FIELD(is_local);	return newnode;}static VariableShowStmt *_copyVariableShowStmt(VariableShowStmt *from){	VariableShowStmt *newnode = makeNode(VariableShowStmt);	COPY_STRING_FIELD(name);	return newnode;}static VariableResetStmt *_copyVariableResetStmt(VariableResetStmt *from){	VariableResetStmt *newnode = makeNode(VariableResetStmt);	COPY_STRING_FIELD(name);	return newnode;}static CreateTrigStmt *_copyCreateTrigStmt(CreateTrigStmt *from){	CreateTrigStmt *newnode = makeNode(CreateTrigStmt);	COPY_STRING_FIELD(trigname);	COPY_NODE_FIELD(relation);	COPY_NODE_FIELD(funcname);	COPY_NODE_FIELD(args);	COPY_SCALAR_FIELD(before);	COPY_SCALAR_FIELD(row);	strcpy(newnode->actions, from->actions);	/* in-line string field */	COPY_SCALAR_FIELD(isconstraint);	COPY_SCALAR_FIELD(deferrable);	COPY_SCALAR_FIELD(initdeferred);	COPY_NODE_FIELD(constrrel);	return newnode;}static DropPropertyStmt *_copyDropPropertyStmt(DropPropertyStmt *from){	DropPropertyStmt *newnode = makeNode(DropPropertyStmt);	COPY_NODE_FIELD(relation);	COPY_STRING_FIELD(property);	COPY_SCALAR_FIELD(removeType);	COPY_SCALAR_FIELD(behavior);	return newnode;}static CreatePLangStmt *_copyCreatePLangStmt(CreatePLangStmt *from){	CreatePLangStmt *newnode = makeNode(CreatePLangStmt);	COPY_STRING_FIELD(plname);	COPY_NODE_FIELD(plhandler);	COPY_NODE_FIELD(plvalidator);	COPY_SCALAR_FIELD(pltrusted);	return newnode;}static DropPLangStmt *_copyDropPLangStmt(DropPLangStmt *from){	DropPLangStmt *newnode = makeNode(DropPLangStmt);	COPY_STRING_FIELD(plname);	COPY_SCALAR_FIELD(behavior);	return newnode;}static CreateUserStmt *_copyCreateUserStmt(CreateUserStmt *from){	CreateUserStmt *newnode = makeNode(CreateUserStmt);	COPY_STRING_FIELD(user);	COPY_NODE_FIELD(options);	return newnode;}static AlterUserStmt *_copyAlterUserStmt(AlterUserStmt *from){	AlterUserStmt *newnode = makeNode(AlterUserStmt);

⌨️ 快捷键说明

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