PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
copyfuncs.c File Reference
#include "postgres.h"
#include "miscadmin.h"
#include "nodes/extensible.h"
#include "nodes/plannodes.h"
#include "nodes/relation.h"
#include "utils/datum.h"
#include "utils/rel.h"
Include dependency graph for copyfuncs.c:

Go to the source code of this file.

Macros

#define COPY_SCALAR_FIELD(fldname)   (newnode->fldname = from->fldname)
 
#define COPY_NODE_FIELD(fldname)   (newnode->fldname = copyObject(from->fldname))
 
#define COPY_BITMAPSET_FIELD(fldname)   (newnode->fldname = bms_copy(from->fldname))
 
#define COPY_STRING_FIELD(fldname)   (newnode->fldname = from->fldname ? pstrdup(from->fldname) : (char *) NULL)
 
#define COPY_POINTER_FIELD(fldname, sz)
 
#define COPY_LOCATION_FIELD(fldname)   (newnode->fldname = from->fldname)
 
#define COPY_NODE_CELL(new, old)
 

Functions

static PlannedStmt_copyPlannedStmt (const PlannedStmt *from)
 
static void CopyPlanFields (const Plan *from, Plan *newnode)
 
static Plan_copyPlan (const Plan *from)
 
static Result_copyResult (const Result *from)
 
static ProjectSet_copyProjectSet (const ProjectSet *from)
 
static ModifyTable_copyModifyTable (const ModifyTable *from)
 
static Append_copyAppend (const Append *from)
 
static MergeAppend_copyMergeAppend (const MergeAppend *from)
 
static RecursiveUnion_copyRecursiveUnion (const RecursiveUnion *from)
 
static BitmapAnd_copyBitmapAnd (const BitmapAnd *from)
 
static BitmapOr_copyBitmapOr (const BitmapOr *from)
 
static Gather_copyGather (const Gather *from)
 
static GatherMerge_copyGatherMerge (const GatherMerge *from)
 
static void CopyScanFields (const Scan *from, Scan *newnode)
 
static Scan_copyScan (const Scan *from)
 
static SeqScan_copySeqScan (const SeqScan *from)
 
static SampleScan_copySampleScan (const SampleScan *from)
 
static IndexScan_copyIndexScan (const IndexScan *from)
 
static IndexOnlyScan_copyIndexOnlyScan (const IndexOnlyScan *from)
 
static BitmapIndexScan_copyBitmapIndexScan (const BitmapIndexScan *from)
 
static BitmapHeapScan_copyBitmapHeapScan (const BitmapHeapScan *from)
 
static TidScan_copyTidScan (const TidScan *from)
 
static SubqueryScan_copySubqueryScan (const SubqueryScan *from)
 
static FunctionScan_copyFunctionScan (const FunctionScan *from)
 
static TableFuncScan_copyTableFuncScan (const TableFuncScan *from)
 
static ValuesScan_copyValuesScan (const ValuesScan *from)
 
static CteScan_copyCteScan (const CteScan *from)
 
static WorkTableScan_copyWorkTableScan (const WorkTableScan *from)
 
static ForeignScan_copyForeignScan (const ForeignScan *from)
 
static CustomScan_copyCustomScan (const CustomScan *from)
 
static void CopyJoinFields (const Join *from, Join *newnode)
 
static Join_copyJoin (const Join *from)
 
static NestLoop_copyNestLoop (const NestLoop *from)
 
static MergeJoin_copyMergeJoin (const MergeJoin *from)
 
static HashJoin_copyHashJoin (const HashJoin *from)
 
static Material_copyMaterial (const Material *from)
 
static Sort_copySort (const Sort *from)
 
static Group_copyGroup (const Group *from)
 
static Agg_copyAgg (const Agg *from)
 
static WindowAgg_copyWindowAgg (const WindowAgg *from)
 
static Unique_copyUnique (const Unique *from)
 
static Hash_copyHash (const Hash *from)
 
static SetOp_copySetOp (const SetOp *from)
 
static LockRows_copyLockRows (const LockRows *from)
 
static Limit_copyLimit (const Limit *from)
 
static NestLoopParam_copyNestLoopParam (const NestLoopParam *from)
 
static PlanRowMark_copyPlanRowMark (const PlanRowMark *from)
 
static PlanInvalItem_copyPlanInvalItem (const PlanInvalItem *from)
 
static Alias_copyAlias (const Alias *from)
 
static RangeVar_copyRangeVar (const RangeVar *from)
 
static TableFunc_copyTableFunc (const TableFunc *from)
 
static IntoClause_copyIntoClause (const IntoClause *from)
 
static Var_copyVar (const Var *from)
 
static Const_copyConst (const Const *from)
 
static Param_copyParam (const Param *from)
 
static Aggref_copyAggref (const Aggref *from)
 
static GroupingFunc_copyGroupingFunc (const GroupingFunc *from)
 
static WindowFunc_copyWindowFunc (const WindowFunc *from)
 
static ArrayRef_copyArrayRef (const ArrayRef *from)
 
static FuncExpr_copyFuncExpr (const FuncExpr *from)
 
static NamedArgExpr_copyNamedArgExpr (const NamedArgExpr *from)
 
static OpExpr_copyOpExpr (const OpExpr *from)
 
static DistinctExpr_copyDistinctExpr (const DistinctExpr *from)
 
static NullIfExpr_copyNullIfExpr (const NullIfExpr *from)
 
static ScalarArrayOpExpr_copyScalarArrayOpExpr (const ScalarArrayOpExpr *from)
 
static BoolExpr_copyBoolExpr (const BoolExpr *from)
 
static SubLink_copySubLink (const SubLink *from)
 
static SubPlan_copySubPlan (const SubPlan *from)
 
static AlternativeSubPlan_copyAlternativeSubPlan (const AlternativeSubPlan *from)
 
static FieldSelect_copyFieldSelect (const FieldSelect *from)
 
static FieldStore_copyFieldStore (const FieldStore *from)
 
static RelabelType_copyRelabelType (const RelabelType *from)
 
static CoerceViaIO_copyCoerceViaIO (const CoerceViaIO *from)
 
static ArrayCoerceExpr_copyArrayCoerceExpr (const ArrayCoerceExpr *from)
 
static ConvertRowtypeExpr_copyConvertRowtypeExpr (const ConvertRowtypeExpr *from)
 
static CollateExpr_copyCollateExpr (const CollateExpr *from)
 
static CaseExpr_copyCaseExpr (const CaseExpr *from)
 
static CaseWhen_copyCaseWhen (const CaseWhen *from)
 
static CaseTestExpr_copyCaseTestExpr (const CaseTestExpr *from)
 
static ArrayExpr_copyArrayExpr (const ArrayExpr *from)
 
static RowExpr_copyRowExpr (const RowExpr *from)
 
static RowCompareExpr_copyRowCompareExpr (const RowCompareExpr *from)
 
static CoalesceExpr_copyCoalesceExpr (const CoalesceExpr *from)
 
static MinMaxExpr_copyMinMaxExpr (const MinMaxExpr *from)
 
static SQLValueFunction_copySQLValueFunction (const SQLValueFunction *from)
 
static XmlExpr_copyXmlExpr (const XmlExpr *from)
 
static NullTest_copyNullTest (const NullTest *from)
 
static BooleanTest_copyBooleanTest (const BooleanTest *from)
 
static CoerceToDomain_copyCoerceToDomain (const CoerceToDomain *from)
 
static CoerceToDomainValue_copyCoerceToDomainValue (const CoerceToDomainValue *from)
 
static SetToDefault_copySetToDefault (const SetToDefault *from)
 
static CurrentOfExpr_copyCurrentOfExpr (const CurrentOfExpr *from)
 
static InferenceElem_copyInferenceElem (const InferenceElem *from)
 
static TargetEntry_copyTargetEntry (const TargetEntry *from)
 
static RangeTblRef_copyRangeTblRef (const RangeTblRef *from)
 
static JoinExpr_copyJoinExpr (const JoinExpr *from)
 
static FromExpr_copyFromExpr (const FromExpr *from)
 
static OnConflictExpr_copyOnConflictExpr (const OnConflictExpr *from)
 
static PathKey_copyPathKey (const PathKey *from)
 
static RestrictInfo_copyRestrictInfo (const RestrictInfo *from)
 
static PlaceHolderVar_copyPlaceHolderVar (const PlaceHolderVar *from)
 
static SpecialJoinInfo_copySpecialJoinInfo (const SpecialJoinInfo *from)
 
static AppendRelInfo_copyAppendRelInfo (const AppendRelInfo *from)
 
static PartitionedChildRelInfo_copyPartitionedChildRelInfo (const PartitionedChildRelInfo *from)
 
static PlaceHolderInfo_copyPlaceHolderInfo (const PlaceHolderInfo *from)
 
static RangeTblEntry_copyRangeTblEntry (const RangeTblEntry *from)
 
static RangeTblFunction_copyRangeTblFunction (const RangeTblFunction *from)
 
static TableSampleClause_copyTableSampleClause (const TableSampleClause *from)
 
static WithCheckOption_copyWithCheckOption (const WithCheckOption *from)
 
static SortGroupClause_copySortGroupClause (const SortGroupClause *from)
 
static GroupingSet_copyGroupingSet (const GroupingSet *from)
 
static WindowClause_copyWindowClause (const WindowClause *from)
 
static RowMarkClause_copyRowMarkClause (const RowMarkClause *from)
 
static WithClause_copyWithClause (const WithClause *from)
 
static InferClause_copyInferClause (const InferClause *from)
 
static OnConflictClause_copyOnConflictClause (const OnConflictClause *from)
 
static CommonTableExpr_copyCommonTableExpr (const CommonTableExpr *from)
 
static A_Expr_copyAExpr (const A_Expr *from)
 
static ColumnRef_copyColumnRef (const ColumnRef *from)
 
static ParamRef_copyParamRef (const ParamRef *from)
 
static A_Const_copyAConst (const A_Const *from)
 
static FuncCall_copyFuncCall (const FuncCall *from)
 
static A_Star_copyAStar (const A_Star *from)
 
static A_Indices_copyAIndices (const A_Indices *from)
 
static A_Indirection_copyA_Indirection (const A_Indirection *from)
 
static A_ArrayExpr_copyA_ArrayExpr (const A_ArrayExpr *from)
 
static ResTarget_copyResTarget (const ResTarget *from)
 
static MultiAssignRef_copyMultiAssignRef (const MultiAssignRef *from)
 
static TypeName_copyTypeName (const TypeName *from)
 
static SortBy_copySortBy (const SortBy *from)
 
static WindowDef_copyWindowDef (const WindowDef *from)
 
static RangeSubselect_copyRangeSubselect (const RangeSubselect *from)
 
static RangeFunction_copyRangeFunction (const RangeFunction *from)
 
static RangeTableSample_copyRangeTableSample (const RangeTableSample *from)
 
static RangeTableFunc_copyRangeTableFunc (const RangeTableFunc *from)
 
static RangeTableFuncCol_copyRangeTableFuncCol (const RangeTableFuncCol *from)
 
static TypeCast_copyTypeCast (const TypeCast *from)
 
static CollateClause_copyCollateClause (const CollateClause *from)
 
static IndexElem_copyIndexElem (const IndexElem *from)
 
static ColumnDef_copyColumnDef (const ColumnDef *from)
 
static Constraint_copyConstraint (const Constraint *from)
 
static DefElem_copyDefElem (const DefElem *from)
 
static LockingClause_copyLockingClause (const LockingClause *from)
 
static XmlSerialize_copyXmlSerialize (const XmlSerialize *from)
 
static RoleSpec_copyRoleSpec (const RoleSpec *from)
 
static TriggerTransition_copyTriggerTransition (const TriggerTransition *from)
 
static Query_copyQuery (const Query *from)
 
static RawStmt_copyRawStmt (const RawStmt *from)
 
static InsertStmt_copyInsertStmt (const InsertStmt *from)
 
static DeleteStmt_copyDeleteStmt (const DeleteStmt *from)
 
static UpdateStmt_copyUpdateStmt (const UpdateStmt *from)
 
static SelectStmt_copySelectStmt (const SelectStmt *from)
 
static SetOperationStmt_copySetOperationStmt (const SetOperationStmt *from)
 
static AlterTableStmt_copyAlterTableStmt (const AlterTableStmt *from)
 
static AlterTableCmd_copyAlterTableCmd (const AlterTableCmd *from)
 
static AlterDomainStmt_copyAlterDomainStmt (const AlterDomainStmt *from)
 
static GrantStmt_copyGrantStmt (const GrantStmt *from)
 
static ObjectWithArgs_copyObjectWithArgs (const ObjectWithArgs *from)
 
static AccessPriv_copyAccessPriv (const AccessPriv *from)
 
static GrantRoleStmt_copyGrantRoleStmt (const GrantRoleStmt *from)
 
static AlterDefaultPrivilegesStmt_copyAlterDefaultPrivilegesStmt (const AlterDefaultPrivilegesStmt *from)
 
static DeclareCursorStmt_copyDeclareCursorStmt (const DeclareCursorStmt *from)
 
static ClosePortalStmt_copyClosePortalStmt (const ClosePortalStmt *from)
 
static ClusterStmt_copyClusterStmt (const ClusterStmt *from)
 
static CopyStmt_copyCopyStmt (const CopyStmt *from)
 
static void CopyCreateStmtFields (const CreateStmt *from, CreateStmt *newnode)
 
static CreateStmt_copyCreateStmt (const CreateStmt *from)
 
static TableLikeClause_copyTableLikeClause (const TableLikeClause *from)
 
static DefineStmt_copyDefineStmt (const DefineStmt *from)
 
static DropStmt_copyDropStmt (const DropStmt *from)
 
static TruncateStmt_copyTruncateStmt (const TruncateStmt *from)
 
static CommentStmt_copyCommentStmt (const CommentStmt *from)
 
static SecLabelStmt_copySecLabelStmt (const SecLabelStmt *from)
 
static FetchStmt_copyFetchStmt (const FetchStmt *from)
 
static IndexStmt_copyIndexStmt (const IndexStmt *from)
 
static CreateFunctionStmt_copyCreateFunctionStmt (const CreateFunctionStmt *from)
 
static FunctionParameter_copyFunctionParameter (const FunctionParameter *from)
 
static AlterFunctionStmt_copyAlterFunctionStmt (const AlterFunctionStmt *from)
 
static DoStmt_copyDoStmt (const DoStmt *from)
 
static RenameStmt_copyRenameStmt (const RenameStmt *from)
 
static AlterObjectDependsStmt_copyAlterObjectDependsStmt (const AlterObjectDependsStmt *from)
 
static AlterObjectSchemaStmt_copyAlterObjectSchemaStmt (const AlterObjectSchemaStmt *from)
 
static AlterOwnerStmt_copyAlterOwnerStmt (const AlterOwnerStmt *from)
 
static AlterOperatorStmt_copyAlterOperatorStmt (const AlterOperatorStmt *from)
 
static RuleStmt_copyRuleStmt (const RuleStmt *from)
 
static NotifyStmt_copyNotifyStmt (const NotifyStmt *from)
 
static ListenStmt_copyListenStmt (const ListenStmt *from)
 
static UnlistenStmt_copyUnlistenStmt (const UnlistenStmt *from)
 
static TransactionStmt_copyTransactionStmt (const TransactionStmt *from)
 
static CompositeTypeStmt_copyCompositeTypeStmt (const CompositeTypeStmt *from)
 
static CreateEnumStmt_copyCreateEnumStmt (const CreateEnumStmt *from)
 
static CreateRangeStmt_copyCreateRangeStmt (const CreateRangeStmt *from)
 
static AlterEnumStmt_copyAlterEnumStmt (const AlterEnumStmt *from)
 
static ViewStmt_copyViewStmt (const ViewStmt *from)
 
static LoadStmt_copyLoadStmt (const LoadStmt *from)
 
static CreateDomainStmt_copyCreateDomainStmt (const CreateDomainStmt *from)
 
static CreateOpClassStmt_copyCreateOpClassStmt (const CreateOpClassStmt *from)
 
static CreateOpClassItem_copyCreateOpClassItem (const CreateOpClassItem *from)
 
static CreateOpFamilyStmt_copyCreateOpFamilyStmt (const CreateOpFamilyStmt *from)
 
static AlterOpFamilyStmt_copyAlterOpFamilyStmt (const AlterOpFamilyStmt *from)
 
static CreatedbStmt_copyCreatedbStmt (const CreatedbStmt *from)
 
static AlterDatabaseStmt_copyAlterDatabaseStmt (const AlterDatabaseStmt *from)
 
static AlterDatabaseSetStmt_copyAlterDatabaseSetStmt (const AlterDatabaseSetStmt *from)
 
static DropdbStmt_copyDropdbStmt (const DropdbStmt *from)
 
static VacuumStmt_copyVacuumStmt (const VacuumStmt *from)
 
static ExplainStmt_copyExplainStmt (const ExplainStmt *from)
 
static CreateTableAsStmt_copyCreateTableAsStmt (const CreateTableAsStmt *from)
 
static RefreshMatViewStmt_copyRefreshMatViewStmt (const RefreshMatViewStmt *from)
 
static ReplicaIdentityStmt_copyReplicaIdentityStmt (const ReplicaIdentityStmt *from)
 
static AlterSystemStmt_copyAlterSystemStmt (const AlterSystemStmt *from)
 
static CreateSeqStmt_copyCreateSeqStmt (const CreateSeqStmt *from)
 
static AlterSeqStmt_copyAlterSeqStmt (const AlterSeqStmt *from)
 
static VariableSetStmt_copyVariableSetStmt (const VariableSetStmt *from)
 
static VariableShowStmt_copyVariableShowStmt (const VariableShowStmt *from)
 
static DiscardStmt_copyDiscardStmt (const DiscardStmt *from)
 
static CreateTableSpaceStmt_copyCreateTableSpaceStmt (const CreateTableSpaceStmt *from)
 
static DropTableSpaceStmt_copyDropTableSpaceStmt (const DropTableSpaceStmt *from)
 
static AlterTableSpaceOptionsStmt_copyAlterTableSpaceOptionsStmt (const AlterTableSpaceOptionsStmt *from)
 
static AlterTableMoveAllStmt_copyAlterTableMoveAllStmt (const AlterTableMoveAllStmt *from)
 
static CreateExtensionStmt_copyCreateExtensionStmt (const CreateExtensionStmt *from)
 
static AlterExtensionStmt_copyAlterExtensionStmt (const AlterExtensionStmt *from)
 
static AlterExtensionContentsStmt_copyAlterExtensionContentsStmt (const AlterExtensionContentsStmt *from)
 
static CreateFdwStmt_copyCreateFdwStmt (const CreateFdwStmt *from)
 
static AlterFdwStmt_copyAlterFdwStmt (const AlterFdwStmt *from)
 
static CreateForeignServerStmt_copyCreateForeignServerStmt (const CreateForeignServerStmt *from)
 
static AlterForeignServerStmt_copyAlterForeignServerStmt (const AlterForeignServerStmt *from)
 
static CreateUserMappingStmt_copyCreateUserMappingStmt (const CreateUserMappingStmt *from)
 
static AlterUserMappingStmt_copyAlterUserMappingStmt (const AlterUserMappingStmt *from)
 
static DropUserMappingStmt_copyDropUserMappingStmt (const DropUserMappingStmt *from)
 
static CreateForeignTableStmt_copyCreateForeignTableStmt (const CreateForeignTableStmt *from)
 
static ImportForeignSchemaStmt_copyImportForeignSchemaStmt (const ImportForeignSchemaStmt *from)
 
static CreateTransformStmt_copyCreateTransformStmt (const CreateTransformStmt *from)
 
static CreateAmStmt_copyCreateAmStmt (const CreateAmStmt *from)
 
static CreateTrigStmt_copyCreateTrigStmt (const CreateTrigStmt *from)
 
static CreateEventTrigStmt_copyCreateEventTrigStmt (const CreateEventTrigStmt *from)
 
static AlterEventTrigStmt_copyAlterEventTrigStmt (const AlterEventTrigStmt *from)
 
static CreatePLangStmt_copyCreatePLangStmt (const CreatePLangStmt *from)
 
static CreateRoleStmt_copyCreateRoleStmt (const CreateRoleStmt *from)
 
static AlterRoleStmt_copyAlterRoleStmt (const AlterRoleStmt *from)
 
static AlterRoleSetStmt_copyAlterRoleSetStmt (const AlterRoleSetStmt *from)
 
static DropRoleStmt_copyDropRoleStmt (const DropRoleStmt *from)
 
static LockStmt_copyLockStmt (const LockStmt *from)
 
static ConstraintsSetStmt_copyConstraintsSetStmt (const ConstraintsSetStmt *from)
 
static ReindexStmt_copyReindexStmt (const ReindexStmt *from)
 
static CreateSchemaStmt_copyCreateSchemaStmt (const CreateSchemaStmt *from)
 
static CreateConversionStmt_copyCreateConversionStmt (const CreateConversionStmt *from)
 
static CreateCastStmt_copyCreateCastStmt (const CreateCastStmt *from)
 
static PrepareStmt_copyPrepareStmt (const PrepareStmt *from)
 
static ExecuteStmt_copyExecuteStmt (const ExecuteStmt *from)
 
static DeallocateStmt_copyDeallocateStmt (const DeallocateStmt *from)
 
static DropOwnedStmt_copyDropOwnedStmt (const DropOwnedStmt *from)
 
static ReassignOwnedStmt_copyReassignOwnedStmt (const ReassignOwnedStmt *from)
 
static AlterTSDictionaryStmt_copyAlterTSDictionaryStmt (const AlterTSDictionaryStmt *from)
 
static AlterTSConfigurationStmt_copyAlterTSConfigurationStmt (const AlterTSConfigurationStmt *from)
 
static CreatePolicyStmt_copyCreatePolicyStmt (const CreatePolicyStmt *from)
 
static AlterPolicyStmt_copyAlterPolicyStmt (const AlterPolicyStmt *from)
 
static PartitionSpec_copyPartitionSpec (const PartitionSpec *from)
 
static PartitionElem_copyPartitionElem (const PartitionElem *from)
 
static PartitionBoundSpec_copyPartitionBoundSpec (const PartitionBoundSpec *from)
 
static PartitionRangeDatum_copyPartitionRangeDatum (const PartitionRangeDatum *from)
 
static PartitionCmd_copyPartitionCmd (const PartitionCmd *from)
 
static CreatePublicationStmt_copyCreatePublicationStmt (const CreatePublicationStmt *from)
 
static AlterPublicationStmt_copyAlterPublicationStmt (const AlterPublicationStmt *from)
 
static CreateSubscriptionStmt_copyCreateSubscriptionStmt (const CreateSubscriptionStmt *from)
 
static AlterSubscriptionStmt_copyAlterSubscriptionStmt (const AlterSubscriptionStmt *from)
 
static DropSubscriptionStmt_copyDropSubscriptionStmt (const DropSubscriptionStmt *from)
 
static List_copyList (const List *from)
 
static ExtensibleNode_copyExtensibleNode (const ExtensibleNode *from)
 
static Value_copyValue (const Value *from)
 
static ForeignKeyCacheInfo_copyForeignKeyCacheInfo (const ForeignKeyCacheInfo *from)
 
void * copyObject (const void *from)
 

Macro Definition Documentation

#define COPY_NODE_CELL (   new,
  old 
)
Value:
(new) = (ListCell *) palloc(sizeof(ListCell)); \
lfirst(new) = copyObject(lfirst(old));
void * copyObject(const void *from)
Definition: copyfuncs.c:4592
#define lfirst(lc)
Definition: pg_list.h:106
void * palloc(Size size)
Definition: mcxt.c:849

Definition at line 4481 of file copyfuncs.c.

Referenced by _copyList().

#define COPY_NODE_FIELD (   fldname)    (newnode->fldname = copyObject(from->fldname))

Definition at line 45 of file copyfuncs.c.

Referenced by _copyA_ArrayExpr(), _copyA_Indirection(), _copyAccessPriv(), _copyAExpr(), _copyAgg(), _copyAggref(), _copyAIndices(), _copyAlias(), _copyAlterDatabaseSetStmt(), _copyAlterDatabaseStmt(), _copyAlterDefaultPrivilegesStmt(), _copyAlterDomainStmt(), _copyAlterEnumStmt(), _copyAlterExtensionContentsStmt(), _copyAlterExtensionStmt(), _copyAlterFdwStmt(), _copyAlterForeignServerStmt(), _copyAlterFunctionStmt(), _copyAlternativeSubPlan(), _copyAlterObjectDependsStmt(), _copyAlterObjectSchemaStmt(), _copyAlterOperatorStmt(), _copyAlterOpFamilyStmt(), _copyAlterOwnerStmt(), _copyAlterPolicyStmt(), _copyAlterPublicationStmt(), _copyAlterRoleSetStmt(), _copyAlterRoleStmt(), _copyAlterSeqStmt(), _copyAlterSubscriptionStmt(), _copyAlterSystemStmt(), _copyAlterTableCmd(), _copyAlterTableMoveAllStmt(), _copyAlterTableSpaceOptionsStmt(), _copyAlterTableStmt(), _copyAlterTSConfigurationStmt(), _copyAlterTSDictionaryStmt(), _copyAlterUserMappingStmt(), _copyAppend(), _copyAppendRelInfo(), _copyArrayCoerceExpr(), _copyArrayExpr(), _copyArrayRef(), _copyBitmapAnd(), _copyBitmapHeapScan(), _copyBitmapIndexScan(), _copyBitmapOr(), _copyBooleanTest(), _copyBoolExpr(), _copyCaseExpr(), _copyCaseWhen(), _copyClusterStmt(), _copyCoalesceExpr(), _copyCoerceToDomain(), _copyCoerceViaIO(), _copyCollateClause(), _copyCollateExpr(), _copyColumnDef(), _copyColumnRef(), _copyCommentStmt(), _copyCommonTableExpr(), _copyCompositeTypeStmt(), _copyConstraint(), _copyConstraintsSetStmt(), _copyConvertRowtypeExpr(), _copyCopyStmt(), _copyCreateAmStmt(), _copyCreateCastStmt(), _copyCreateConversionStmt(), _copyCreatedbStmt(), _copyCreateDomainStmt(), _copyCreateEnumStmt(), _copyCreateEventTrigStmt(), _copyCreateExtensionStmt(), _copyCreateFdwStmt(), _copyCreateForeignServerStmt(), _copyCreateForeignTableStmt(), _copyCreateFunctionStmt(), _copyCreateOpClassItem(), _copyCreateOpClassStmt(), _copyCreateOpFamilyStmt(), _copyCreatePLangStmt(), _copyCreatePolicyStmt(), _copyCreatePublicationStmt(), _copyCreateRangeStmt(), _copyCreateRoleStmt(), _copyCreateSchemaStmt(), _copyCreateSeqStmt(), _copyCreateSubscriptionStmt(), _copyCreateTableAsStmt(), _copyCreateTableSpaceStmt(), _copyCreateTransformStmt(), _copyCreateTrigStmt(), _copyCreateUserMappingStmt(), _copyCustomScan(), _copyDeclareCursorStmt(), _copyDefElem(), _copyDefineStmt(), _copyDeleteStmt(), _copyDistinctExpr(), _copyDoStmt(), _copyDropOwnedStmt(), _copyDropRoleStmt(), _copyDropStmt(), _copyDropUserMappingStmt(), _copyExecuteStmt(), _copyExplainStmt(), _copyFieldSelect(), _copyFieldStore(), _copyForeignScan(), _copyFromExpr(), _copyFuncCall(), _copyFuncExpr(), _copyFunctionParameter(), _copyFunctionScan(), _copyGrantRoleStmt(), _copyGrantStmt(), _copyGroupingFunc(), _copyGroupingSet(), _copyHashJoin(), _copyImportForeignSchemaStmt(), _copyIndexElem(), _copyIndexOnlyScan(), _copyIndexScan(), _copyIndexStmt(), _copyInferClause(), _copyInferenceElem(), _copyInsertStmt(), _copyIntoClause(), _copyJoinExpr(), _copyLimit(), _copyLockingClause(), _copyLockRows(), _copyLockStmt(), _copyMergeAppend(), _copyMergeJoin(), _copyMinMaxExpr(), _copyModifyTable(), _copyMultiAssignRef(), _copyNamedArgExpr(), _copyNestLoop(), _copyNestLoopParam(), _copyNullIfExpr(), _copyNullTest(), _copyObjectWithArgs(), _copyOnConflictClause(), _copyOnConflictExpr(), _copyOpExpr(), _copyPartitionBoundSpec(), _copyPartitionCmd(), _copyPartitionedChildRelInfo(), _copyPartitionElem(), _copyPartitionRangeDatum(), _copyPartitionSpec(), _copyPlaceHolderInfo(), _copyPlaceHolderVar(), _copyPlannedStmt(), _copyPrepareStmt(), _copyQuery(), _copyRangeFunction(), _copyRangeSubselect(), _copyRangeTableFunc(), _copyRangeTableFuncCol(), _copyRangeTableSample(), _copyRangeTblEntry(), _copyRangeTblFunction(), _copyRangeVar(), _copyRawStmt(), _copyReassignOwnedStmt(), _copyRefreshMatViewStmt(), _copyReindexStmt(), _copyRelabelType(), _copyRenameStmt(), _copyResTarget(), _copyRestrictInfo(), _copyResult(), _copyRowCompareExpr(), _copyRowExpr(), _copyRuleStmt(), _copySampleScan(), _copyScalarArrayOpExpr(), _copySecLabelStmt(), _copySelectStmt(), _copySetOperationStmt(), _copySortBy(), _copySpecialJoinInfo(), _copySubLink(), _copySubPlan(), _copySubqueryScan(), _copyTableFunc(), _copyTableFuncScan(), _copyTableLikeClause(), _copyTableSampleClause(), _copyTargetEntry(), _copyTidScan(), _copyTransactionStmt(), _copyTruncateStmt(), _copyTypeCast(), _copyTypeName(), _copyUpdateStmt(), _copyVacuumStmt(), _copyValuesScan(), _copyVariableSetStmt(), _copyViewStmt(), _copyWindowAgg(), _copyWindowClause(), _copyWindowDef(), _copyWindowFunc(), _copyWithCheckOption(), _copyWithClause(), _copyXmlExpr(), _copyXmlSerialize(), CopyCreateStmtFields(), CopyJoinFields(), and CopyPlanFields().

#define COPY_POINTER_FIELD (   fldname,
  sz 
)
Value:
do { \
Size _size = (sz); \
newnode->fldname = palloc(_size); \
memcpy(newnode->fldname, from->fldname, _size); \
} while (0)
size_t Size
Definition: c.h:356
void * palloc(Size size)
Definition: mcxt.c:849

Definition at line 57 of file copyfuncs.c.

Referenced by _copyAgg(), _copyGatherMerge(), _copyGroup(), _copyMergeAppend(), _copyMergeJoin(), _copyRecursiveUnion(), _copySetOp(), _copySort(), _copyUnique(), and _copyWindowAgg().

#define COPY_SCALAR_FIELD (   fldname)    (newnode->fldname = from->fldname)

Definition at line 41 of file copyfuncs.c.

Referenced by _copyAConst(), _copyAExpr(), _copyAgg(), _copyAggref(), _copyAIndices(), _copyAlterDomainStmt(), _copyAlterEnumStmt(), _copyAlterEventTrigStmt(), _copyAlterExtensionContentsStmt(), _copyAlterForeignServerStmt(), _copyAlterObjectDependsStmt(), _copyAlterObjectSchemaStmt(), _copyAlterOpFamilyStmt(), _copyAlterOwnerStmt(), _copyAlterPublicationStmt(), _copyAlterRoleStmt(), _copyAlterSeqStmt(), _copyAlterTableCmd(), _copyAlterTableMoveAllStmt(), _copyAlterTableSpaceOptionsStmt(), _copyAlterTableStmt(), _copyAlterTSConfigurationStmt(), _copyAppendRelInfo(), _copyArrayCoerceExpr(), _copyArrayExpr(), _copyArrayRef(), _copyBitmapIndexScan(), _copyBitmapOr(), _copyBooleanTest(), _copyBoolExpr(), _copyCaseExpr(), _copyCaseTestExpr(), _copyClusterStmt(), _copyCoalesceExpr(), _copyCoerceToDomain(), _copyCoerceToDomainValue(), _copyCoerceViaIO(), _copyCollateExpr(), _copyColumnDef(), _copyCommentStmt(), _copyCommonTableExpr(), _copyConst(), _copyConstraint(), _copyConstraintsSetStmt(), _copyConvertRowtypeExpr(), _copyCopyStmt(), _copyCreateAmStmt(), _copyCreateCastStmt(), _copyCreateConversionStmt(), _copyCreateExtensionStmt(), _copyCreateForeignServerStmt(), _copyCreateFunctionStmt(), _copyCreateOpClassItem(), _copyCreateOpClassStmt(), _copyCreatePLangStmt(), _copyCreatePolicyStmt(), _copyCreatePublicationStmt(), _copyCreateRoleStmt(), _copyCreateSchemaStmt(), _copyCreateSeqStmt(), _copyCreateTableAsStmt(), _copyCreateTransformStmt(), _copyCreateTrigStmt(), _copyCreateUserMappingStmt(), _copyCteScan(), _copyCurrentOfExpr(), _copyCustomScan(), _copyDeclareCursorStmt(), _copyDefElem(), _copyDefineStmt(), _copyDiscardStmt(), _copyDistinctExpr(), _copyDropdbStmt(), _copyDropOwnedStmt(), _copyDropRoleStmt(), _copyDropStmt(), _copyDropSubscriptionStmt(), _copyDropTableSpaceStmt(), _copyDropUserMappingStmt(), _copyFetchStmt(), _copyFieldSelect(), _copyFieldStore(), _copyForeignKeyCacheInfo(), _copyForeignScan(), _copyFuncCall(), _copyFuncExpr(), _copyFunctionParameter(), _copyFunctionScan(), _copyGather(), _copyGatherMerge(), _copyGrantRoleStmt(), _copyGrantStmt(), _copyGroup(), _copyGroupingFunc(), _copyGroupingSet(), _copyHash(), _copyImportForeignSchemaStmt(), _copyIndexElem(), _copyIndexOnlyScan(), _copyIndexScan(), _copyIndexStmt(), _copyInferenceElem(), _copyIntoClause(), _copyJoinExpr(), _copyLockingClause(), _copyLockRows(), _copyLockStmt(), _copyMergeAppend(), _copyMinMaxExpr(), _copyModifyTable(), _copyMultiAssignRef(), _copyNamedArgExpr(), _copyNestLoopParam(), _copyNullIfExpr(), _copyNullTest(), _copyObjectWithArgs(), _copyOnConflictClause(), _copyOnConflictExpr(), _copyOpExpr(), _copyParam(), _copyParamRef(), _copyPartitionBoundSpec(), _copyPartitionedChildRelInfo(), _copyPartitionRangeDatum(), _copyPathKey(), _copyPlaceHolderInfo(), _copyPlaceHolderVar(), _copyPlanInvalItem(), _copyPlannedStmt(), _copyPlanRowMark(), _copyQuery(), _copyRangeFunction(), _copyRangeSubselect(), _copyRangeTableFunc(), _copyRangeTableFuncCol(), _copyRangeTblEntry(), _copyRangeTblFunction(), _copyRangeTblRef(), _copyRangeVar(), _copyRecursiveUnion(), _copyRefreshMatViewStmt(), _copyReindexStmt(), _copyRelabelType(), _copyRenameStmt(), _copyReplicaIdentityStmt(), _copyRestrictInfo(), _copyRoleSpec(), _copyRowCompareExpr(), _copyRowExpr(), _copyRowMarkClause(), _copyRuleStmt(), _copyScalarArrayOpExpr(), _copySecLabelStmt(), _copySelectStmt(), _copySetOp(), _copySetOperationStmt(), _copySetToDefault(), _copySort(), _copySortBy(), _copySortGroupClause(), _copySpecialJoinInfo(), _copySQLValueFunction(), _copySubLink(), _copySubPlan(), _copyTableFunc(), _copyTableLikeClause(), _copyTableSampleClause(), _copyTargetEntry(), _copyTransactionStmt(), _copyTriggerTransition(), _copyTruncateStmt(), _copyTypeName(), _copyUnique(), _copyVacuumStmt(), _copyValue(), _copyVar(), _copyVariableSetStmt(), _copyViewStmt(), _copyWindowAgg(), _copyWindowClause(), _copyWindowDef(), _copyWindowFunc(), _copyWithCheckOption(), _copyWithClause(), _copyWorkTableScan(), _copyXmlExpr(), _copyXmlSerialize(), CopyCreateStmtFields(), CopyJoinFields(), CopyPlanFields(), and CopyScanFields().

#define COPY_STRING_FIELD (   fldname)    (newnode->fldname = from->fldname ? pstrdup(from->fldname) : (char *) NULL)

Definition at line 53 of file copyfuncs.c.

Referenced by _copyAccessPriv(), _copyAConst(), _copyAlias(), _copyAlterDatabaseSetStmt(), _copyAlterDatabaseStmt(), _copyAlterDomainStmt(), _copyAlterEnumStmt(), _copyAlterEventTrigStmt(), _copyAlterExtensionContentsStmt(), _copyAlterExtensionStmt(), _copyAlterFdwStmt(), _copyAlterForeignServerStmt(), _copyAlterObjectSchemaStmt(), _copyAlterOpFamilyStmt(), _copyAlterPolicyStmt(), _copyAlterPublicationStmt(), _copyAlterRoleSetStmt(), _copyAlterSubscriptionStmt(), _copyAlterTableCmd(), _copyAlterTableMoveAllStmt(), _copyAlterTableSpaceOptionsStmt(), _copyAlterUserMappingStmt(), _copyClosePortalStmt(), _copyClusterStmt(), _copyColumnDef(), _copyCommentStmt(), _copyCommonTableExpr(), _copyConstraint(), _copyCopyStmt(), _copyCreateAmStmt(), _copyCreateConversionStmt(), _copyCreatedbStmt(), _copyCreateEventTrigStmt(), _copyCreateExtensionStmt(), _copyCreateFdwStmt(), _copyCreateForeignServerStmt(), _copyCreateForeignTableStmt(), _copyCreateOpClassStmt(), _copyCreateOpFamilyStmt(), _copyCreatePLangStmt(), _copyCreatePolicyStmt(), _copyCreatePublicationStmt(), _copyCreateRoleStmt(), _copyCreateSchemaStmt(), _copyCreateSubscriptionStmt(), _copyCreateTableSpaceStmt(), _copyCreateTransformStmt(), _copyCreateTrigStmt(), _copyCreateUserMappingStmt(), _copyCurrentOfExpr(), _copyDeallocateStmt(), _copyDeclareCursorStmt(), _copyDefElem(), _copyDropdbStmt(), _copyDropSubscriptionStmt(), _copyDropTableSpaceStmt(), _copyDropUserMappingStmt(), _copyExecuteStmt(), _copyExtensibleNode(), _copyFetchStmt(), _copyFunctionParameter(), _copyImportForeignSchemaStmt(), _copyIndexElem(), _copyIndexStmt(), _copyInferClause(), _copyIntoClause(), _copyListenStmt(), _copyLoadStmt(), _copyNamedArgExpr(), _copyNotifyStmt(), _copyPartitionElem(), _copyPartitionSpec(), _copyPrepareStmt(), _copyRangeTableFuncCol(), _copyRangeTblEntry(), _copyRangeVar(), _copyReindexStmt(), _copyRenameStmt(), _copyReplicaIdentityStmt(), _copyResTarget(), _copyRoleSpec(), _copyRuleStmt(), _copySecLabelStmt(), _copySubPlan(), _copyTargetEntry(), _copyTransactionStmt(), _copyTriggerTransition(), _copyUnlistenStmt(), _copyValue(), _copyVariableSetStmt(), _copyVariableShowStmt(), _copyWindowClause(), _copyWindowDef(), _copyWithCheckOption(), _copyXmlExpr(), and CopyCreateStmtFields().

Function Documentation

static A_ArrayExpr* _copyA_ArrayExpr ( const A_ArrayExpr from)
static

Definition at line 2561 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

2562 {
2563  A_ArrayExpr *newnode = makeNode(A_ArrayExpr);
2564 
2565  COPY_NODE_FIELD(elements);
2566  COPY_LOCATION_FIELD(location);
2567 
2568  return newnode;
2569 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static A_Indirection* _copyA_Indirection ( const A_Indirection from)
static

Definition at line 2550 of file copyfuncs.c.

References arg, COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

2551 {
2552  A_Indirection *newnode = makeNode(A_Indirection);
2553 
2555  COPY_NODE_FIELD(indirection);
2556 
2557  return newnode;
2558 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
void * arg
static AccessPriv* _copyAccessPriv ( const AccessPriv from)
static

Definition at line 3094 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3095 {
3096  AccessPriv *newnode = makeNode(AccessPriv);
3097 
3098  COPY_STRING_FIELD(priv_name);
3099  COPY_NODE_FIELD(cols);
3100 
3101  return newnode;
3102 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static A_Const* _copyAConst ( const A_Const from)
static

Definition at line 2480 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, elog, ERROR, makeNode, T_BitString, T_Float, T_Integer, T_Null, T_String, Value::type, A_Const::val, and val.

Referenced by copyObject().

2481 {
2482  A_Const *newnode = makeNode(A_Const);
2483 
2484  /* This part must duplicate _copyValue */
2485  COPY_SCALAR_FIELD(val.type);
2486  switch (from->val.type)
2487  {
2488  case T_Integer:
2489  COPY_SCALAR_FIELD(val.val.ival);
2490  break;
2491  case T_Float:
2492  case T_String:
2493  case T_BitString:
2494  COPY_STRING_FIELD(val.val.str);
2495  break;
2496  case T_Null:
2497  /* nothing to do */
2498  break;
2499  default:
2500  elog(ERROR, "unrecognized node type: %d",
2501  (int) from->val.type);
2502  break;
2503  }
2504 
2505  COPY_LOCATION_FIELD(location);
2506 
2507  return newnode;
2508 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define ERROR
Definition: elog.h:43
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
Definition: nodes.h:298
Definition: nodes.h:295
#define elog
Definition: elog.h:219
Value val
Definition: parsenodes.h:279
long val
Definition: informix.c:689
NodeTag type
Definition: value.h:44
static A_Expr* _copyAExpr ( const A_Expr from)
static

Definition at line 2444 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, makeNode, and name.

Referenced by copyObject().

2445 {
2446  A_Expr *newnode = makeNode(A_Expr);
2447 
2448  COPY_SCALAR_FIELD(kind);
2450  COPY_NODE_FIELD(lexpr);
2451  COPY_NODE_FIELD(rexpr);
2452  COPY_LOCATION_FIELD(location);
2453 
2454  return newnode;
2455 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
const char * name
Definition: encode.c:521
static Agg* _copyAgg ( const Agg from)
static

Definition at line 935 of file copyfuncs.c.

References COPY_BITMAPSET_FIELD, COPY_NODE_FIELD, COPY_POINTER_FIELD, COPY_SCALAR_FIELD, CopyPlanFields(), makeNode, and Agg::numCols.

Referenced by copyObject().

936 {
937  Agg *newnode = makeNode(Agg);
938 
939  CopyPlanFields((const Plan *) from, (Plan *) newnode);
940 
941  COPY_SCALAR_FIELD(aggstrategy);
942  COPY_SCALAR_FIELD(aggsplit);
943  COPY_SCALAR_FIELD(numCols);
944  if (from->numCols > 0)
945  {
946  COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
947  COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
948  }
949  COPY_SCALAR_FIELD(numGroups);
950  COPY_BITMAPSET_FIELD(aggParams);
951  COPY_NODE_FIELD(groupingSets);
952  COPY_NODE_FIELD(chain);
953 
954  return newnode;
955 }
#define COPY_BITMAPSET_FIELD(fldname)
Definition: copyfuncs.c:49
int numCols
Definition: plannodes.h:756
unsigned int Oid
Definition: postgres_ext.h:31
#define COPY_POINTER_FIELD(fldname, sz)
Definition: copyfuncs.c:57
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:566
Definition: plannodes.h:751
int16 AttrNumber
Definition: attnum.h:21
static Aggref* _copyAggref ( const Aggref from)
static

Definition at line 1325 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1326 {
1327  Aggref *newnode = makeNode(Aggref);
1328 
1329  COPY_SCALAR_FIELD(aggfnoid);
1330  COPY_SCALAR_FIELD(aggtype);
1331  COPY_SCALAR_FIELD(aggcollid);
1332  COPY_SCALAR_FIELD(inputcollid);
1333  COPY_SCALAR_FIELD(aggtranstype);
1334  COPY_NODE_FIELD(aggargtypes);
1335  COPY_NODE_FIELD(aggdirectargs);
1337  COPY_NODE_FIELD(aggorder);
1338  COPY_NODE_FIELD(aggdistinct);
1339  COPY_NODE_FIELD(aggfilter);
1340  COPY_SCALAR_FIELD(aggstar);
1341  COPY_SCALAR_FIELD(aggvariadic);
1342  COPY_SCALAR_FIELD(aggkind);
1343  COPY_SCALAR_FIELD(agglevelsup);
1344  COPY_SCALAR_FIELD(aggsplit);
1345  COPY_LOCATION_FIELD(location);
1346 
1347  return newnode;
1348 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static A_Indices* _copyAIndices ( const A_Indices from)
static

Definition at line 2538 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

2539 {
2540  A_Indices *newnode = makeNode(A_Indices);
2541 
2542  COPY_SCALAR_FIELD(is_slice);
2543  COPY_NODE_FIELD(lidx);
2544  COPY_NODE_FIELD(uidx);
2545 
2546  return newnode;
2547 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static Alias* _copyAlias ( const Alias from)
static

Definition at line 1164 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

1165 {
1166  Alias *newnode = makeNode(Alias);
1167 
1168  COPY_STRING_FIELD(aliasname);
1169  COPY_NODE_FIELD(colnames);
1170 
1171  return newnode;
1172 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterDatabaseSetStmt* _copyAlterDatabaseSetStmt ( const AlterDatabaseSetStmt from)
static

Definition at line 3669 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObject().

3670 {
3672 
3674  COPY_NODE_FIELD(setstmt);
3675 
3676  return newnode;
3677 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
char * dbname
Definition: streamutil.c:38
static AlterDatabaseStmt* _copyAlterDatabaseStmt ( const AlterDatabaseStmt from)
static

Definition at line 3658 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObject().

3659 {
3661 
3664 
3665  return newnode;
3666 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
char * dbname
Definition: streamutil.c:38
static AlterDefaultPrivilegesStmt* _copyAlterDefaultPrivilegesStmt ( const AlterDefaultPrivilegesStmt from)
static

Definition at line 3120 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

3121 {
3123 
3125  COPY_NODE_FIELD(action);
3126 
3127  return newnode;
3128 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static AlterDomainStmt* _copyAlterDomainStmt ( const AlterDomainStmt from)
static

Definition at line 3050 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObject().

3051 {
3053 
3054  COPY_SCALAR_FIELD(subtype);
3055  COPY_NODE_FIELD(typeName);
3057  COPY_NODE_FIELD(def);
3058  COPY_SCALAR_FIELD(behavior);
3059  COPY_SCALAR_FIELD(missing_ok);
3060 
3061  return newnode;
3062 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
const char * name
Definition: encode.c:521
static AlterEnumStmt* _copyAlterEnumStmt ( const AlterEnumStmt from)
static

Definition at line 3540 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3541 {
3542  AlterEnumStmt *newnode = makeNode(AlterEnumStmt);
3543 
3544  COPY_NODE_FIELD(typeName);
3545  COPY_STRING_FIELD(oldVal);
3546  COPY_STRING_FIELD(newVal);
3547  COPY_STRING_FIELD(newValNeighbor);
3548  COPY_SCALAR_FIELD(newValIsAfter);
3549  COPY_SCALAR_FIELD(skipIfNewValExists);
3550 
3551  return newnode;
3552 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterEventTrigStmt* _copyAlterEventTrigStmt ( const AlterEventTrigStmt from)
static

Definition at line 4084 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4085 {
4087 
4088  COPY_STRING_FIELD(trigname);
4089  COPY_SCALAR_FIELD(tgenabled);
4090 
4091  return newnode;
4092 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterExtensionContentsStmt* _copyAlterExtensionContentsStmt ( const AlterExtensionContentsStmt from)
static

Definition at line 3892 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3893 {
3895 
3896  COPY_STRING_FIELD(extname);
3897  COPY_SCALAR_FIELD(action);
3898  COPY_SCALAR_FIELD(objtype);
3899  COPY_NODE_FIELD(object);
3900 
3901  return newnode;
3902 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterExtensionStmt* _copyAlterExtensionStmt ( const AlterExtensionStmt from)
static

Definition at line 3881 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3882 {
3884 
3885  COPY_STRING_FIELD(extname);
3887 
3888  return newnode;
3889 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterFdwStmt* _copyAlterFdwStmt ( const AlterFdwStmt from)
static

Definition at line 3917 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3918 {
3919  AlterFdwStmt *newnode = makeNode(AlterFdwStmt);
3920 
3921  COPY_STRING_FIELD(fdwname);
3922  COPY_NODE_FIELD(func_options);
3924 
3925  return newnode;
3926 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterForeignServerStmt* _copyAlterForeignServerStmt ( const AlterForeignServerStmt from)
static

Definition at line 3944 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3945 {
3947 
3948  COPY_STRING_FIELD(servername);
3949  COPY_STRING_FIELD(version);
3951  COPY_SCALAR_FIELD(has_version);
3952 
3953  return newnode;
3954 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterFunctionStmt* _copyAlterFunctionStmt ( const AlterFunctionStmt from)
static

Definition at line 3359 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

3360 {
3362 
3363  COPY_NODE_FIELD(func);
3364  COPY_NODE_FIELD(actions);
3365 
3366  return newnode;
3367 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static AlternativeSubPlan* _copyAlternativeSubPlan ( const AlternativeSubPlan from)
static

Definition at line 1589 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

1590 {
1592 
1593  COPY_NODE_FIELD(subplans);
1594 
1595  return newnode;
1596 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static AlterObjectDependsStmt* _copyAlterObjectDependsStmt ( const AlterObjectDependsStmt from)
static

Definition at line 3397 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

3398 {
3400 
3401  COPY_SCALAR_FIELD(objectType);
3402  COPY_NODE_FIELD(relation);
3403  COPY_NODE_FIELD(object);
3404  COPY_NODE_FIELD(extname);
3405 
3406  return newnode;
3407 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static AlterObjectSchemaStmt* _copyAlterObjectSchemaStmt ( const AlterObjectSchemaStmt from)
static

Definition at line 3410 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3411 {
3413 
3414  COPY_SCALAR_FIELD(objectType);
3415  COPY_NODE_FIELD(relation);
3416  COPY_NODE_FIELD(object);
3417  COPY_STRING_FIELD(newschema);
3418  COPY_SCALAR_FIELD(missing_ok);
3419 
3420  return newnode;
3421 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterOperatorStmt* _copyAlterOperatorStmt ( const AlterOperatorStmt from)
static

Definition at line 3437 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

3438 {
3440 
3441  COPY_NODE_FIELD(opername);
3443 
3444  return newnode;
3445 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static AlterOpFamilyStmt* _copyAlterOpFamilyStmt ( const AlterOpFamilyStmt from)
static

Definition at line 3634 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3635 {
3637 
3638  COPY_NODE_FIELD(opfamilyname);
3639  COPY_STRING_FIELD(amname);
3640  COPY_SCALAR_FIELD(isDrop);
3641  COPY_NODE_FIELD(items);
3642 
3643  return newnode;
3644 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterOwnerStmt* _copyAlterOwnerStmt ( const AlterOwnerStmt from)
static

Definition at line 3424 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

3425 {
3427 
3428  COPY_SCALAR_FIELD(objectType);
3429  COPY_NODE_FIELD(relation);
3430  COPY_NODE_FIELD(object);
3431  COPY_NODE_FIELD(newowner);
3432 
3433  return newnode;
3434 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static AlterPolicyStmt* _copyAlterPolicyStmt ( const AlterPolicyStmt from)
static

Definition at line 4332 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4333 {
4335 
4336  COPY_STRING_FIELD(policy_name);
4337  COPY_NODE_FIELD(table);
4338  COPY_NODE_FIELD(roles);
4339  COPY_NODE_FIELD(qual);
4340  COPY_NODE_FIELD(with_check);
4341 
4342  return newnode;
4343 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterPublicationStmt* _copyAlterPublicationStmt ( const AlterPublicationStmt from)
static

Definition at line 4422 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4423 {
4425 
4426  COPY_STRING_FIELD(pubname);
4428  COPY_NODE_FIELD(tables);
4429  COPY_SCALAR_FIELD(for_all_tables);
4430  COPY_SCALAR_FIELD(tableAction);
4431 
4432  return newnode;
4433 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterRoleSetStmt* _copyAlterRoleSetStmt ( const AlterRoleSetStmt from)
static

Definition at line 4134 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4135 {
4137 
4138  COPY_NODE_FIELD(role);
4139  COPY_STRING_FIELD(database);
4140  COPY_NODE_FIELD(setstmt);
4141 
4142  return newnode;
4143 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterRoleStmt* _copyAlterRoleStmt ( const AlterRoleStmt from)
static

Definition at line 4122 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

4123 {
4124  AlterRoleStmt *newnode = makeNode(AlterRoleStmt);
4125 
4126  COPY_NODE_FIELD(role);
4128  COPY_SCALAR_FIELD(action);
4129 
4130  return newnode;
4131 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static AlterSeqStmt* _copyAlterSeqStmt ( const AlterSeqStmt from)
static

Definition at line 3774 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

3775 {
3776  AlterSeqStmt *newnode = makeNode(AlterSeqStmt);
3777 
3778  COPY_NODE_FIELD(sequence);
3780  COPY_SCALAR_FIELD(missing_ok);
3781 
3782  return newnode;
3783 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static AlterSubscriptionStmt* _copyAlterSubscriptionStmt ( const AlterSubscriptionStmt from)
static

Definition at line 4449 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4450 {
4452 
4453  COPY_STRING_FIELD(subname);
4455 
4456  return newnode;
4457 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterSystemStmt* _copyAlterSystemStmt ( const AlterSystemStmt from)
static

Definition at line 3751 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

3752 {
3754 
3755  COPY_NODE_FIELD(setstmt);
3756 
3757  return newnode;
3758 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static AlterTableCmd* _copyAlterTableCmd ( const AlterTableCmd from)
static

Definition at line 3035 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObject().

3036 {
3037  AlterTableCmd *newnode = makeNode(AlterTableCmd);
3038 
3039  COPY_SCALAR_FIELD(subtype);
3041  COPY_NODE_FIELD(newowner);
3042  COPY_NODE_FIELD(def);
3043  COPY_SCALAR_FIELD(behavior);
3044  COPY_SCALAR_FIELD(missing_ok);
3045 
3046  return newnode;
3047 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
const char * name
Definition: encode.c:521
static AlterTableMoveAllStmt* _copyAlterTableMoveAllStmt ( const AlterTableMoveAllStmt from)
static

Definition at line 3855 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3856 {
3858 
3859  COPY_STRING_FIELD(orig_tablespacename);
3860  COPY_SCALAR_FIELD(objtype);
3861  COPY_NODE_FIELD(roles);
3862  COPY_STRING_FIELD(new_tablespacename);
3863  COPY_SCALAR_FIELD(nowait);
3864 
3865  return newnode;
3866 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterTableSpaceOptionsStmt* _copyAlterTableSpaceOptionsStmt ( const AlterTableSpaceOptionsStmt from)
static

Definition at line 3843 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3844 {
3846 
3847  COPY_STRING_FIELD(tablespacename);
3849  COPY_SCALAR_FIELD(isReset);
3850 
3851  return newnode;
3852 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static AlterTableStmt* _copyAlterTableStmt ( const AlterTableStmt from)
static

Definition at line 3022 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

3023 {
3025 
3026  COPY_NODE_FIELD(relation);
3027  COPY_NODE_FIELD(cmds);
3028  COPY_SCALAR_FIELD(relkind);
3029  COPY_SCALAR_FIELD(missing_ok);
3030 
3031  return newnode;
3032 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static AlterTSConfigurationStmt* _copyAlterTSConfigurationStmt ( const AlterTSConfigurationStmt from)
static

Definition at line 4300 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

4301 {
4303 
4304  COPY_SCALAR_FIELD(kind);
4305  COPY_NODE_FIELD(cfgname);
4306  COPY_NODE_FIELD(tokentype);
4307  COPY_NODE_FIELD(dicts);
4308  COPY_SCALAR_FIELD(override);
4309  COPY_SCALAR_FIELD(replace);
4310  COPY_SCALAR_FIELD(missing_ok);
4311 
4312  return newnode;
4313 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static AlterTSDictionaryStmt* _copyAlterTSDictionaryStmt ( const AlterTSDictionaryStmt from)
static

Definition at line 4289 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

4290 {
4292 
4293  COPY_NODE_FIELD(dictname);
4295 
4296  return newnode;
4297 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static AlterUserMappingStmt* _copyAlterUserMappingStmt ( const AlterUserMappingStmt from)
static

Definition at line 3970 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, makeNode, and user.

Referenced by copyObject().

3971 {
3973 
3975  COPY_STRING_FIELD(servername);
3977 
3978  return newnode;
3979 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static char * user
Definition: pg_regress.c:92
static Append* _copyAppend ( const Append from)
static

Definition at line 228 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObject().

229 {
230  Append *newnode = makeNode(Append);
231 
232  /*
233  * copy node superclass fields
234  */
235  CopyPlanFields((const Plan *) from, (Plan *) newnode);
236 
237  /*
238  * copy remainder of node
239  */
240  COPY_NODE_FIELD(partitioned_rels);
241  COPY_NODE_FIELD(appendplans);
242 
243  return newnode;
244 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:566
static AppendRelInfo* _copyAppendRelInfo ( const AppendRelInfo from)
static

Definition at line 2197 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

2198 {
2199  AppendRelInfo *newnode = makeNode(AppendRelInfo);
2200 
2201  COPY_SCALAR_FIELD(parent_relid);
2202  COPY_SCALAR_FIELD(child_relid);
2203  COPY_SCALAR_FIELD(parent_reltype);
2204  COPY_SCALAR_FIELD(child_reltype);
2205  COPY_NODE_FIELD(translated_vars);
2206  COPY_SCALAR_FIELD(parent_reloid);
2207 
2208  return newnode;
2209 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static ArrayCoerceExpr* _copyArrayCoerceExpr ( const ArrayCoerceExpr from)
static

Definition at line 1670 of file copyfuncs.c.

References arg, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1671 {
1673 
1675  COPY_SCALAR_FIELD(elemfuncid);
1676  COPY_SCALAR_FIELD(resulttype);
1677  COPY_SCALAR_FIELD(resulttypmod);
1678  COPY_SCALAR_FIELD(resultcollid);
1679  COPY_SCALAR_FIELD(isExplicit);
1680  COPY_SCALAR_FIELD(coerceformat);
1681  COPY_LOCATION_FIELD(location);
1682 
1683  return newnode;
1684 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
void * arg
static ArrayExpr* _copyArrayExpr ( const ArrayExpr from)
static

Definition at line 1769 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1770 {
1771  ArrayExpr *newnode = makeNode(ArrayExpr);
1772 
1773  COPY_SCALAR_FIELD(array_typeid);
1774  COPY_SCALAR_FIELD(array_collid);
1775  COPY_SCALAR_FIELD(element_typeid);
1776  COPY_NODE_FIELD(elements);
1777  COPY_SCALAR_FIELD(multidims);
1778  COPY_LOCATION_FIELD(location);
1779 
1780  return newnode;
1781 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static ArrayRef* _copyArrayRef ( const ArrayRef from)
static

Definition at line 1393 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1394 {
1395  ArrayRef *newnode = makeNode(ArrayRef);
1396 
1397  COPY_SCALAR_FIELD(refarraytype);
1398  COPY_SCALAR_FIELD(refelemtype);
1399  COPY_SCALAR_FIELD(reftypmod);
1400  COPY_SCALAR_FIELD(refcollid);
1401  COPY_NODE_FIELD(refupperindexpr);
1402  COPY_NODE_FIELD(reflowerindexpr);
1403  COPY_NODE_FIELD(refexpr);
1404  COPY_NODE_FIELD(refassgnexpr);
1405 
1406  return newnode;
1407 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static A_Star* _copyAStar ( const A_Star from)
static

Definition at line 2530 of file copyfuncs.c.

References makeNode.

Referenced by copyObject().

2531 {
2532  A_Star *newnode = makeNode(A_Star);
2533 
2534  return newnode;
2535 }
#define makeNode(_type_)
Definition: nodes.h:566
static BitmapAnd* _copyBitmapAnd ( const BitmapAnd from)
static

Definition at line 305 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObject().

306 {
307  BitmapAnd *newnode = makeNode(BitmapAnd);
308 
309  /*
310  * copy node superclass fields
311  */
312  CopyPlanFields((const Plan *) from, (Plan *) newnode);
313 
314  /*
315  * copy remainder of node
316  */
317  COPY_NODE_FIELD(bitmapplans);
318 
319  return newnode;
320 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:566
static BitmapHeapScan* _copyBitmapHeapScan ( const BitmapHeapScan from)
static

Definition at line 540 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObject().

541 {
543 
544  /*
545  * copy node superclass fields
546  */
547  CopyScanFields((const Scan *) from, (Scan *) newnode);
548 
549  /*
550  * copy remainder of node
551  */
552  COPY_NODE_FIELD(bitmapqualorig);
553 
554  return newnode;
555 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:400
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static BitmapIndexScan* _copyBitmapIndexScan ( const BitmapIndexScan from)
static

Definition at line 516 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObject().

517 {
519 
520  /*
521  * copy node superclass fields
522  */
523  CopyScanFields((const Scan *) from, (Scan *) newnode);
524 
525  /*
526  * copy remainder of node
527  */
528  COPY_SCALAR_FIELD(indexid);
529  COPY_SCALAR_FIELD(isshared);
530  COPY_NODE_FIELD(indexqual);
531  COPY_NODE_FIELD(indexqualorig);
532 
533  return newnode;
534 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:400
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static BitmapOr* _copyBitmapOr ( const BitmapOr from)
static

Definition at line 326 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObject().

327 {
328  BitmapOr *newnode = makeNode(BitmapOr);
329 
330  /*
331  * copy node superclass fields
332  */
333  CopyPlanFields((const Plan *) from, (Plan *) newnode);
334 
335  /*
336  * copy remainder of node
337  */
338  COPY_SCALAR_FIELD(isshared);
339  COPY_NODE_FIELD(bitmapplans);
340 
341  return newnode;
342 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:566
static BooleanTest* _copyBooleanTest ( const BooleanTest from)
static

Definition at line 1909 of file copyfuncs.c.

References arg, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1910 {
1911  BooleanTest *newnode = makeNode(BooleanTest);
1912 
1914  COPY_SCALAR_FIELD(booltesttype);
1915  COPY_LOCATION_FIELD(location);
1916 
1917  return newnode;
1918 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
void * arg
static BoolExpr* _copyBoolExpr ( const BoolExpr from)
static

Definition at line 1528 of file copyfuncs.c.

References generate_unaccent_rules::args, boolop(), COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1529 {
1530  BoolExpr *newnode = makeNode(BoolExpr);
1531 
1534  COPY_LOCATION_FIELD(location);
1535 
1536  return newnode;
1537 }
Datum boolop(PG_FUNCTION_ARGS)
Definition: _int_bool.c:420
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static CaseExpr* _copyCaseExpr ( const CaseExpr from)
static

Definition at line 1721 of file copyfuncs.c.

References arg, generate_unaccent_rules::args, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1722 {
1723  CaseExpr *newnode = makeNode(CaseExpr);
1724 
1725  COPY_SCALAR_FIELD(casetype);
1726  COPY_SCALAR_FIELD(casecollid);
1729  COPY_NODE_FIELD(defresult);
1730  COPY_LOCATION_FIELD(location);
1731 
1732  return newnode;
1733 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
void * arg
static CaseTestExpr* _copyCaseTestExpr ( const CaseTestExpr from)
static

Definition at line 1754 of file copyfuncs.c.

References COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1755 {
1756  CaseTestExpr *newnode = makeNode(CaseTestExpr);
1757 
1758  COPY_SCALAR_FIELD(typeId);
1759  COPY_SCALAR_FIELD(typeMod);
1760  COPY_SCALAR_FIELD(collation);
1761 
1762  return newnode;
1763 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define makeNode(_type_)
Definition: nodes.h:566
static CaseWhen* _copyCaseWhen ( const CaseWhen from)
static

Definition at line 1739 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

1740 {
1741  CaseWhen *newnode = makeNode(CaseWhen);
1742 
1743  COPY_NODE_FIELD(expr);
1744  COPY_NODE_FIELD(result);
1745  COPY_LOCATION_FIELD(location);
1746 
1747  return newnode;
1748 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static ClosePortalStmt* _copyClosePortalStmt ( const ClosePortalStmt from)
static

Definition at line 3143 of file copyfuncs.c.

References COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3144 {
3146 
3147  COPY_STRING_FIELD(portalname);
3148 
3149  return newnode;
3150 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static ClusterStmt* _copyClusterStmt ( const ClusterStmt from)
static

Definition at line 3153 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, makeNode, and verbose.

Referenced by copyObject().

3154 {
3155  ClusterStmt *newnode = makeNode(ClusterStmt);
3156 
3157  COPY_NODE_FIELD(relation);
3158  COPY_STRING_FIELD(indexname);
3160 
3161  return newnode;
3162 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
static int verbose
Definition: pg_basebackup.c:84
#define makeNode(_type_)
Definition: nodes.h:566
static CoalesceExpr* _copyCoalesceExpr ( const CoalesceExpr from)
static

Definition at line 1822 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1823 {
1824  CoalesceExpr *newnode = makeNode(CoalesceExpr);
1825 
1826  COPY_SCALAR_FIELD(coalescetype);
1827  COPY_SCALAR_FIELD(coalescecollid);
1829  COPY_LOCATION_FIELD(location);
1830 
1831  return newnode;
1832 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static CoerceToDomain* _copyCoerceToDomain ( const CoerceToDomain from)
static

Definition at line 1924 of file copyfuncs.c.

References arg, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1925 {
1927 
1929  COPY_SCALAR_FIELD(resulttype);
1930  COPY_SCALAR_FIELD(resulttypmod);
1931  COPY_SCALAR_FIELD(resultcollid);
1932  COPY_SCALAR_FIELD(coercionformat);
1933  COPY_LOCATION_FIELD(location);
1934 
1935  return newnode;
1936 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
void * arg
static CoerceToDomainValue* _copyCoerceToDomainValue ( const CoerceToDomainValue from)
static

Definition at line 1942 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1943 {
1945 
1946  COPY_SCALAR_FIELD(typeId);
1947  COPY_SCALAR_FIELD(typeMod);
1948  COPY_SCALAR_FIELD(collation);
1949  COPY_LOCATION_FIELD(location);
1950 
1951  return newnode;
1952 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static CoerceViaIO* _copyCoerceViaIO ( const CoerceViaIO from)
static

Definition at line 1653 of file copyfuncs.c.

References arg, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1654 {
1655  CoerceViaIO *newnode = makeNode(CoerceViaIO);
1656 
1658  COPY_SCALAR_FIELD(resulttype);
1659  COPY_SCALAR_FIELD(resultcollid);
1660  COPY_SCALAR_FIELD(coerceformat);
1661  COPY_LOCATION_FIELD(location);
1662 
1663  return newnode;
1664 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
void * arg
static CollateClause* _copyCollateClause ( const CollateClause from)
static

Definition at line 2730 of file copyfuncs.c.

References arg, COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

2731 {
2732  CollateClause *newnode = makeNode(CollateClause);
2733 
2735  COPY_NODE_FIELD(collname);
2736  COPY_LOCATION_FIELD(location);
2737 
2738  return newnode;
2739 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
void * arg
static CollateExpr* _copyCollateExpr ( const CollateExpr from)
static

Definition at line 1706 of file copyfuncs.c.

References arg, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1707 {
1708  CollateExpr *newnode = makeNode(CollateExpr);
1709 
1711  COPY_SCALAR_FIELD(collOid);
1712  COPY_LOCATION_FIELD(location);
1713 
1714  return newnode;
1715 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
void * arg
static ColumnDef* _copyColumnDef ( const ColumnDef from)
static

Definition at line 2758 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

2759 {
2760  ColumnDef *newnode = makeNode(ColumnDef);
2761 
2762  COPY_STRING_FIELD(colname);
2763  COPY_NODE_FIELD(typeName);
2764  COPY_SCALAR_FIELD(inhcount);
2765  COPY_SCALAR_FIELD(is_local);
2766  COPY_SCALAR_FIELD(is_not_null);
2767  COPY_SCALAR_FIELD(is_from_type);
2768  COPY_SCALAR_FIELD(storage);
2769  COPY_NODE_FIELD(raw_default);
2770  COPY_NODE_FIELD(cooked_default);
2771  COPY_NODE_FIELD(collClause);
2772  COPY_SCALAR_FIELD(collOid);
2773  COPY_NODE_FIELD(constraints);
2774  COPY_NODE_FIELD(fdwoptions);
2775  COPY_LOCATION_FIELD(location);
2776 
2777  return newnode;
2778 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static ColumnRef* _copyColumnRef ( const ColumnRef from)
static

Definition at line 2458 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

2459 {
2460  ColumnRef *newnode = makeNode(ColumnRef);
2461 
2462  COPY_NODE_FIELD(fields);
2463  COPY_LOCATION_FIELD(location);
2464 
2465  return newnode;
2466 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static CommentStmt* _copyCommentStmt ( const CommentStmt from)
static

Definition at line 3265 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3266 {
3267  CommentStmt *newnode = makeNode(CommentStmt);
3268 
3269  COPY_SCALAR_FIELD(objtype);
3270  COPY_NODE_FIELD(object);
3271  COPY_STRING_FIELD(comment);
3272 
3273  return newnode;
3274 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CommonTableExpr* _copyCommonTableExpr ( const CommonTableExpr from)
static

Definition at line 2425 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

2426 {
2428 
2429  COPY_STRING_FIELD(ctename);
2430  COPY_NODE_FIELD(aliascolnames);
2431  COPY_NODE_FIELD(ctequery);
2432  COPY_LOCATION_FIELD(location);
2433  COPY_SCALAR_FIELD(cterecursive);
2434  COPY_SCALAR_FIELD(cterefcount);
2435  COPY_NODE_FIELD(ctecolnames);
2436  COPY_NODE_FIELD(ctecoltypes);
2437  COPY_NODE_FIELD(ctecoltypmods);
2438  COPY_NODE_FIELD(ctecolcollations);
2439 
2440  return newnode;
2441 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static CompositeTypeStmt* _copyCompositeTypeStmt ( const CompositeTypeStmt from)
static

Definition at line 3507 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

3508 {
3510 
3511  COPY_NODE_FIELD(typevar);
3512  COPY_NODE_FIELD(coldeflist);
3513 
3514  return newnode;
3515 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static Const* _copyConst ( const Const from)
static

Definition at line 1269 of file copyfuncs.c.

References Const::constbyval, Const::constisnull, Const::constlen, Const::constvalue, COPY_LOCATION_FIELD, COPY_SCALAR_FIELD, datumCopy(), and makeNode.

Referenced by copyObject().

1270 {
1271  Const *newnode = makeNode(Const);
1272 
1273  COPY_SCALAR_FIELD(consttype);
1274  COPY_SCALAR_FIELD(consttypmod);
1275  COPY_SCALAR_FIELD(constcollid);
1276  COPY_SCALAR_FIELD(constlen);
1277 
1278  if (from->constbyval || from->constisnull)
1279  {
1280  /*
1281  * passed by value so just copy the datum. Also, don't try to copy
1282  * struct when value is null!
1283  */
1284  newnode->constvalue = from->constvalue;
1285  }
1286  else
1287  {
1288  /*
1289  * passed by reference. We need a palloc'd copy.
1290  */
1291  newnode->constvalue = datumCopy(from->constvalue,
1292  from->constbyval,
1293  from->constlen);
1294  }
1295 
1296  COPY_SCALAR_FIELD(constisnull);
1297  COPY_SCALAR_FIELD(constbyval);
1298  COPY_LOCATION_FIELD(location);
1299 
1300  return newnode;
1301 }
Datum constvalue
Definition: primnodes.h:196
bool constbyval
Definition: primnodes.h:199
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
int constlen
Definition: primnodes.h:195
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
Datum datumCopy(Datum value, bool typByVal, int typLen)
Definition: datum.c:128
#define makeNode(_type_)
Definition: nodes.h:566
bool constisnull
Definition: primnodes.h:197
static Constraint* _copyConstraint ( const Constraint from)
static

Definition at line 2781 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

2782 {
2783  Constraint *newnode = makeNode(Constraint);
2784 
2785  COPY_SCALAR_FIELD(contype);
2786  COPY_STRING_FIELD(conname);
2787  COPY_SCALAR_FIELD(deferrable);
2788  COPY_SCALAR_FIELD(initdeferred);
2789  COPY_LOCATION_FIELD(location);
2790  COPY_SCALAR_FIELD(is_no_inherit);
2791  COPY_NODE_FIELD(raw_expr);
2792  COPY_STRING_FIELD(cooked_expr);
2793  COPY_NODE_FIELD(keys);
2794  COPY_NODE_FIELD(exclusions);
2796  COPY_STRING_FIELD(indexname);
2797  COPY_STRING_FIELD(indexspace);
2798  COPY_STRING_FIELD(access_method);
2799  COPY_NODE_FIELD(where_clause);
2800  COPY_NODE_FIELD(pktable);
2801  COPY_NODE_FIELD(fk_attrs);
2802  COPY_NODE_FIELD(pk_attrs);
2803  COPY_SCALAR_FIELD(fk_matchtype);
2804  COPY_SCALAR_FIELD(fk_upd_action);
2805  COPY_SCALAR_FIELD(fk_del_action);
2806  COPY_NODE_FIELD(old_conpfeqop);
2807  COPY_SCALAR_FIELD(old_pktable_oid);
2808  COPY_SCALAR_FIELD(skip_validation);
2809  COPY_SCALAR_FIELD(initially_valid);
2810 
2811  return newnode;
2812 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static ConstraintsSetStmt* _copyConstraintsSetStmt ( const ConstraintsSetStmt from)
static

Definition at line 4169 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

4170 {
4172 
4173  COPY_NODE_FIELD(constraints);
4174  COPY_SCALAR_FIELD(deferred);
4175 
4176  return newnode;
4177 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static ConvertRowtypeExpr* _copyConvertRowtypeExpr ( const ConvertRowtypeExpr from)
static

Definition at line 1690 of file copyfuncs.c.

References arg, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1691 {
1693 
1695  COPY_SCALAR_FIELD(resulttype);
1696  COPY_SCALAR_FIELD(convertformat);
1697  COPY_LOCATION_FIELD(location);
1698 
1699  return newnode;
1700 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
void * arg
static CopyStmt* _copyCopyStmt ( const CopyStmt from)
static

Definition at line 3165 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, filename, and makeNode.

Referenced by copyObject().

3166 {
3167  CopyStmt *newnode = makeNode(CopyStmt);
3168 
3169  COPY_NODE_FIELD(relation);
3170  COPY_NODE_FIELD(query);
3171  COPY_NODE_FIELD(attlist);
3172  COPY_SCALAR_FIELD(is_from);
3173  COPY_SCALAR_FIELD(is_program);
3176 
3177  return newnode;
3178 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static char * filename
Definition: pg_dumpall.c:87
static CreateAmStmt* _copyCreateAmStmt ( const CreateAmStmt from)
static

Definition at line 4036 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4037 {
4038  CreateAmStmt *newnode = makeNode(CreateAmStmt);
4039 
4040  COPY_STRING_FIELD(amname);
4041  COPY_NODE_FIELD(handler_name);
4042  COPY_SCALAR_FIELD(amtype);
4043 
4044  return newnode;
4045 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateCastStmt* _copyCreateCastStmt ( const CreateCastStmt from)
static

Definition at line 4220 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

4221 {
4223 
4224  COPY_NODE_FIELD(sourcetype);
4225  COPY_NODE_FIELD(targettype);
4226  COPY_NODE_FIELD(func);
4227  COPY_SCALAR_FIELD(context);
4228  COPY_SCALAR_FIELD(inout);
4229 
4230  return newnode;
4231 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static CreateConversionStmt* _copyCreateConversionStmt ( const CreateConversionStmt from)
static

Definition at line 4206 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4207 {
4209 
4210  COPY_NODE_FIELD(conversion_name);
4211  COPY_STRING_FIELD(for_encoding_name);
4212  COPY_STRING_FIELD(to_encoding_name);
4213  COPY_NODE_FIELD(func_name);
4214  COPY_SCALAR_FIELD(def);
4215 
4216  return newnode;
4217 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreatedbStmt* _copyCreatedbStmt ( const CreatedbStmt from)
static

Definition at line 3647 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObject().

3648 {
3649  CreatedbStmt *newnode = makeNode(CreatedbStmt);
3650 
3653 
3654  return newnode;
3655 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
char * dbname
Definition: streamutil.c:38
static CreateDomainStmt* _copyCreateDomainStmt ( const CreateDomainStmt from)
static

Definition at line 3580 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

3581 {
3583 
3584  COPY_NODE_FIELD(domainname);
3585  COPY_NODE_FIELD(typeName);
3586  COPY_NODE_FIELD(collClause);
3587  COPY_NODE_FIELD(constraints);
3588 
3589  return newnode;
3590 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static CreateEnumStmt* _copyCreateEnumStmt ( const CreateEnumStmt from)
static

Definition at line 3518 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

3519 {
3521 
3522  COPY_NODE_FIELD(typeName);
3523  COPY_NODE_FIELD(vals);
3524 
3525  return newnode;
3526 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static CreateEventTrigStmt* _copyCreateEventTrigStmt ( const CreateEventTrigStmt from)
static

Definition at line 4071 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4072 {
4074 
4075  COPY_STRING_FIELD(trigname);
4076  COPY_STRING_FIELD(eventname);
4077  COPY_NODE_FIELD(whenclause);
4078  COPY_NODE_FIELD(funcname);
4079 
4080  return newnode;
4081 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateExtensionStmt* _copyCreateExtensionStmt ( const CreateExtensionStmt from)
static

Definition at line 3869 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3870 {
3872 
3873  COPY_STRING_FIELD(extname);
3874  COPY_SCALAR_FIELD(if_not_exists);
3876 
3877  return newnode;
3878 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateFdwStmt* _copyCreateFdwStmt ( const CreateFdwStmt from)
static

Definition at line 3905 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3906 {
3907  CreateFdwStmt *newnode = makeNode(CreateFdwStmt);
3908 
3909  COPY_STRING_FIELD(fdwname);
3910  COPY_NODE_FIELD(func_options);
3912 
3913  return newnode;
3914 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateForeignServerStmt* _copyCreateForeignServerStmt ( const CreateForeignServerStmt from)
static

Definition at line 3929 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3930 {
3932 
3933  COPY_STRING_FIELD(servername);
3934  COPY_STRING_FIELD(servertype);
3935  COPY_STRING_FIELD(version);
3936  COPY_STRING_FIELD(fdwname);
3938  COPY_SCALAR_FIELD(if_not_exists);
3939 
3940  return newnode;
3941 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateForeignTableStmt* _copyCreateForeignTableStmt ( const CreateForeignTableStmt from)
static

Definition at line 3994 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, CopyCreateStmtFields(), and makeNode.

Referenced by copyObject().

3995 {
3997 
3998  CopyCreateStmtFields((const CreateStmt *) from, (CreateStmt *) newnode);
3999 
4000  COPY_STRING_FIELD(servername);
4002 
4003  return newnode;
4004 }
static void CopyCreateStmtFields(const CreateStmt *from, CreateStmt *newnode)
Definition: copyfuncs.c:3187
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateFunctionStmt* _copyCreateFunctionStmt ( const CreateFunctionStmt from)
static

Definition at line 3331 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

3332 {
3334 
3335  COPY_SCALAR_FIELD(replace);
3336  COPY_NODE_FIELD(funcname);
3337  COPY_NODE_FIELD(parameters);
3338  COPY_NODE_FIELD(returnType);
3340  COPY_NODE_FIELD(withClause);
3341 
3342  return newnode;
3343 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static CreateOpClassItem* _copyCreateOpClassItem ( const CreateOpClassItem from)
static

Definition at line 3608 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, makeNode, and name.

Referenced by copyObject().

3609 {
3611 
3612  COPY_SCALAR_FIELD(itemtype);
3614  COPY_SCALAR_FIELD(number);
3615  COPY_NODE_FIELD(order_family);
3616  COPY_NODE_FIELD(class_args);
3617  COPY_NODE_FIELD(storedtype);
3618 
3619  return newnode;
3620 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
const char * name
Definition: encode.c:521
static CreateOpClassStmt* _copyCreateOpClassStmt ( const CreateOpClassStmt from)
static

Definition at line 3593 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3594 {
3596 
3597  COPY_NODE_FIELD(opclassname);
3598  COPY_NODE_FIELD(opfamilyname);
3599  COPY_STRING_FIELD(amname);
3600  COPY_NODE_FIELD(datatype);
3601  COPY_NODE_FIELD(items);
3602  COPY_SCALAR_FIELD(isDefault);
3603 
3604  return newnode;
3605 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateOpFamilyStmt* _copyCreateOpFamilyStmt ( const CreateOpFamilyStmt from)
static

Definition at line 3623 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3624 {
3626 
3627  COPY_NODE_FIELD(opfamilyname);
3628  COPY_STRING_FIELD(amname);
3629 
3630  return newnode;
3631 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreatePLangStmt* _copyCreatePLangStmt ( const CreatePLangStmt from)
static

Definition at line 4095 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4096 {
4098 
4099  COPY_SCALAR_FIELD(replace);
4100  COPY_STRING_FIELD(plname);
4101  COPY_NODE_FIELD(plhandler);
4102  COPY_NODE_FIELD(plinline);
4103  COPY_NODE_FIELD(plvalidator);
4104  COPY_SCALAR_FIELD(pltrusted);
4105 
4106  return newnode;
4107 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreatePolicyStmt* _copyCreatePolicyStmt ( const CreatePolicyStmt from)
static

Definition at line 4316 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4317 {
4319 
4320  COPY_STRING_FIELD(policy_name);
4321  COPY_NODE_FIELD(table);
4322  COPY_STRING_FIELD(cmd_name);
4323  COPY_SCALAR_FIELD(permissive);
4324  COPY_NODE_FIELD(roles);
4325  COPY_NODE_FIELD(qual);
4326  COPY_NODE_FIELD(with_check);
4327 
4328  return newnode;
4329 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreatePublicationStmt* _copyCreatePublicationStmt ( const CreatePublicationStmt from)
static

Definition at line 4409 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4410 {
4412 
4413  COPY_STRING_FIELD(pubname);
4415  COPY_NODE_FIELD(tables);
4416  COPY_SCALAR_FIELD(for_all_tables);
4417 
4418  return newnode;
4419 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateRangeStmt* _copyCreateRangeStmt ( const CreateRangeStmt from)
static

Definition at line 3529 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

3530 {
3532 
3533  COPY_NODE_FIELD(typeName);
3534  COPY_NODE_FIELD(params);
3535 
3536  return newnode;
3537 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static CreateRoleStmt* _copyCreateRoleStmt ( const CreateRoleStmt from)
static

Definition at line 4110 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4111 {
4113 
4114  COPY_SCALAR_FIELD(stmt_type);
4115  COPY_STRING_FIELD(role);
4117 
4118  return newnode;
4119 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateSchemaStmt* _copyCreateSchemaStmt ( const CreateSchemaStmt from)
static

Definition at line 4193 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4194 {
4196 
4197  COPY_STRING_FIELD(schemaname);
4198  COPY_NODE_FIELD(authrole);
4199  COPY_NODE_FIELD(schemaElts);
4200  COPY_SCALAR_FIELD(if_not_exists);
4201 
4202  return newnode;
4203 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateSeqStmt* _copyCreateSeqStmt ( const CreateSeqStmt from)
static

Definition at line 3761 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

3762 {
3763  CreateSeqStmt *newnode = makeNode(CreateSeqStmt);
3764 
3765  COPY_NODE_FIELD(sequence);
3767  COPY_SCALAR_FIELD(ownerId);
3768  COPY_SCALAR_FIELD(if_not_exists);
3769 
3770  return newnode;
3771 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static CreateStmt* _copyCreateStmt ( const CreateStmt from)
static

Definition at line 3203 of file copyfuncs.c.

References CopyCreateStmtFields(), and makeNode.

Referenced by copyObject().

3204 {
3205  CreateStmt *newnode = makeNode(CreateStmt);
3206 
3207  CopyCreateStmtFields(from, newnode);
3208 
3209  return newnode;
3210 }
static void CopyCreateStmtFields(const CreateStmt *from, CreateStmt *newnode)
Definition: copyfuncs.c:3187
#define makeNode(_type_)
Definition: nodes.h:566
static CreateSubscriptionStmt* _copyCreateSubscriptionStmt ( const CreateSubscriptionStmt from)
static

Definition at line 4436 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4437 {
4439 
4440  COPY_STRING_FIELD(subname);
4441  COPY_STRING_FIELD(conninfo);
4442  COPY_NODE_FIELD(publication);
4444 
4445  return newnode;
4446 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateTableAsStmt* _copyCreateTableAsStmt ( const CreateTableAsStmt from)
static

Definition at line 3714 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

3715 {
3717 
3718  COPY_NODE_FIELD(query);
3719  COPY_NODE_FIELD(into);
3720  COPY_SCALAR_FIELD(relkind);
3721  COPY_SCALAR_FIELD(is_select_into);
3722  COPY_SCALAR_FIELD(if_not_exists);
3723 
3724  return newnode;
3725 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static CreateTableSpaceStmt* _copyCreateTableSpaceStmt ( const CreateTableSpaceStmt from)
static

Definition at line 3819 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3820 {
3822 
3823  COPY_STRING_FIELD(tablespacename);
3824  COPY_NODE_FIELD(owner);
3825  COPY_STRING_FIELD(location);
3827 
3828  return newnode;
3829 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateTransformStmt* _copyCreateTransformStmt ( const CreateTransformStmt from)
static

Definition at line 4022 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4023 {
4025 
4026  COPY_SCALAR_FIELD(replace);
4027  COPY_NODE_FIELD(type_name);
4028  COPY_STRING_FIELD(lang);
4029  COPY_NODE_FIELD(fromsql);
4030  COPY_NODE_FIELD(tosql);
4031 
4032  return newnode;
4033 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateTrigStmt* _copyCreateTrigStmt ( const CreateTrigStmt from)
static

Definition at line 4048 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4049 {
4051 
4052  COPY_STRING_FIELD(trigname);
4053  COPY_NODE_FIELD(relation);
4054  COPY_NODE_FIELD(funcname);
4056  COPY_SCALAR_FIELD(row);
4057  COPY_SCALAR_FIELD(timing);
4058  COPY_SCALAR_FIELD(events);
4059  COPY_NODE_FIELD(columns);
4060  COPY_NODE_FIELD(whenClause);
4061  COPY_SCALAR_FIELD(isconstraint);
4062  COPY_NODE_FIELD(transitionRels);
4063  COPY_SCALAR_FIELD(deferrable);
4064  COPY_SCALAR_FIELD(initdeferred);
4065  COPY_NODE_FIELD(constrrel);
4066 
4067  return newnode;
4068 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CreateUserMappingStmt* _copyCreateUserMappingStmt ( const CreateUserMappingStmt from)
static

Definition at line 3957 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, makeNode, and user.

Referenced by copyObject().

3958 {
3960 
3962  COPY_STRING_FIELD(servername);
3964  COPY_SCALAR_FIELD(if_not_exists);
3965 
3966  return newnode;
3967 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static char * user
Definition: pg_regress.c:92
static CteScan* _copyCteScan ( const CteScan from)
static

Definition at line 667 of file copyfuncs.c.

References COPY_SCALAR_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObject().

668 {
669  CteScan *newnode = makeNode(CteScan);
670 
671  /*
672  * copy node superclass fields
673  */
674  CopyScanFields((const Scan *) from, (Scan *) newnode);
675 
676  /*
677  * copy remainder of node
678  */
679  COPY_SCALAR_FIELD(ctePlanId);
680  COPY_SCALAR_FIELD(cteParam);
681 
682  return newnode;
683 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:400
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define makeNode(_type_)
Definition: nodes.h:566
static CurrentOfExpr* _copyCurrentOfExpr ( const CurrentOfExpr from)
static

Definition at line 1974 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

1975 {
1976  CurrentOfExpr *newnode = makeNode(CurrentOfExpr);
1977 
1978  COPY_SCALAR_FIELD(cvarno);
1979  COPY_STRING_FIELD(cursor_name);
1980  COPY_SCALAR_FIELD(cursor_param);
1981 
1982  return newnode;
1983 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static CustomScan* _copyCustomScan ( const CustomScan from)
static

Definition at line 738 of file copyfuncs.c.

References COPY_BITMAPSET_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObject().

739 {
740  CustomScan *newnode = makeNode(CustomScan);
741 
742  /*
743  * copy node superclass fields
744  */
745  CopyScanFields((const Scan *) from, (Scan *) newnode);
746 
747  /*
748  * copy remainder of node
749  */
750  COPY_SCALAR_FIELD(flags);
751  COPY_NODE_FIELD(custom_plans);
752  COPY_NODE_FIELD(custom_exprs);
753  COPY_NODE_FIELD(custom_private);
754  COPY_NODE_FIELD(custom_scan_tlist);
755  COPY_BITMAPSET_FIELD(custom_relids);
756 
757  /*
758  * NOTE: The method field of CustomScan is required to be a pointer to a
759  * static table of callback functions. So we don't copy the table itself,
760  * just reference the original one.
761  */
762  COPY_SCALAR_FIELD(methods);
763 
764  return newnode;
765 }
#define COPY_BITMAPSET_FIELD(fldname)
Definition: copyfuncs.c:49
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:400
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static DeallocateStmt* _copyDeallocateStmt ( const DeallocateStmt from)
static

Definition at line 4257 of file copyfuncs.c.

References COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObject().

4258 {
4260 
4262 
4263  return newnode;
4264 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
const char * name
Definition: encode.c:521
static DeclareCursorStmt* _copyDeclareCursorStmt ( const DeclareCursorStmt from)
static

Definition at line 3131 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3132 {
3134 
3135  COPY_STRING_FIELD(portalname);
3137  COPY_NODE_FIELD(query);
3138 
3139  return newnode;
3140 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static DefElem* _copyDefElem ( const DefElem from)
static

Definition at line 2815 of file copyfuncs.c.

References arg, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

2816 {
2817  DefElem *newnode = makeNode(DefElem);
2818 
2819  COPY_STRING_FIELD(defnamespace);
2820  COPY_STRING_FIELD(defname);
2822  COPY_SCALAR_FIELD(defaction);
2823  COPY_LOCATION_FIELD(location);
2824 
2825  return newnode;
2826 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
void * arg
static DefineStmt* _copyDefineStmt ( const DefineStmt from)
static

Definition at line 3224 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

3225 {
3226  DefineStmt *newnode = makeNode(DefineStmt);
3227 
3228  COPY_SCALAR_FIELD(kind);
3229  COPY_SCALAR_FIELD(oldstyle);
3230  COPY_NODE_FIELD(defnames);
3232  COPY_NODE_FIELD(definition);
3233  COPY_SCALAR_FIELD(if_not_exists);
3234 
3235  return newnode;
3236 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static DeleteStmt* _copyDeleteStmt ( const DeleteStmt from)
static

Definition at line 2949 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

2950 {
2951  DeleteStmt *newnode = makeNode(DeleteStmt);
2952 
2953  COPY_NODE_FIELD(relation);
2954  COPY_NODE_FIELD(usingClause);
2955  COPY_NODE_FIELD(whereClause);
2956  COPY_NODE_FIELD(returningList);
2957  COPY_NODE_FIELD(withClause);
2958 
2959  return newnode;
2960 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static DiscardStmt* _copyDiscardStmt ( const DiscardStmt from)
static

Definition at line 3809 of file copyfuncs.c.

References COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

3810 {
3811  DiscardStmt *newnode = makeNode(DiscardStmt);
3812 
3813  COPY_SCALAR_FIELD(target);
3814 
3815  return newnode;
3816 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define makeNode(_type_)
Definition: nodes.h:566
static DistinctExpr* _copyDistinctExpr ( const DistinctExpr from)
static

Definition at line 1470 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1471 {
1472  DistinctExpr *newnode = makeNode(DistinctExpr);
1473 
1474  COPY_SCALAR_FIELD(opno);
1475  COPY_SCALAR_FIELD(opfuncid);
1476  COPY_SCALAR_FIELD(opresulttype);
1477  COPY_SCALAR_FIELD(opretset);
1478  COPY_SCALAR_FIELD(opcollid);
1479  COPY_SCALAR_FIELD(inputcollid);
1481  COPY_LOCATION_FIELD(location);
1482 
1483  return newnode;
1484 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static DoStmt* _copyDoStmt ( const DoStmt from)
static

Definition at line 3370 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

3371 {
3372  DoStmt *newnode = makeNode(DoStmt);
3373 
3375 
3376  return newnode;
3377 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static DropdbStmt* _copyDropdbStmt ( const DropdbStmt from)
static

Definition at line 3680 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObject().

3681 {
3682  DropdbStmt *newnode = makeNode(DropdbStmt);
3683 
3685  COPY_SCALAR_FIELD(missing_ok);
3686 
3687  return newnode;
3688 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
char * dbname
Definition: streamutil.c:38
static DropOwnedStmt* _copyDropOwnedStmt ( const DropOwnedStmt from)
static

Definition at line 4267 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

4268 {
4269  DropOwnedStmt *newnode = makeNode(DropOwnedStmt);
4270 
4271  COPY_NODE_FIELD(roles);
4272  COPY_SCALAR_FIELD(behavior);
4273 
4274  return newnode;
4275 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static DropRoleStmt* _copyDropRoleStmt ( const DropRoleStmt from)
static

Definition at line 4146 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

4147 {
4148  DropRoleStmt *newnode = makeNode(DropRoleStmt);
4149 
4150  COPY_NODE_FIELD(roles);
4151  COPY_SCALAR_FIELD(missing_ok);
4152 
4153  return newnode;
4154 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static DropStmt* _copyDropStmt ( const DropStmt from)
static

Definition at line 3239 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

3240 {
3241  DropStmt *newnode = makeNode(DropStmt);
3242 
3243  COPY_NODE_FIELD(objects);
3244  COPY_SCALAR_FIELD(removeType);
3245  COPY_SCALAR_FIELD(behavior);
3246  COPY_SCALAR_FIELD(missing_ok);
3247  COPY_SCALAR_FIELD(concurrent);
3248 
3249  return newnode;
3250 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static DropSubscriptionStmt* _copyDropSubscriptionStmt ( const DropSubscriptionStmt from)
static

Definition at line 4460 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4461 {
4463 
4464  COPY_STRING_FIELD(subname);
4465  COPY_SCALAR_FIELD(drop_slot);
4466  COPY_SCALAR_FIELD(missing_ok);
4467 
4468  return newnode;
4469 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static DropTableSpaceStmt* _copyDropTableSpaceStmt ( const DropTableSpaceStmt from)
static

Definition at line 3832 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3833 {
3835 
3836  COPY_STRING_FIELD(tablespacename);
3837  COPY_SCALAR_FIELD(missing_ok);
3838 
3839  return newnode;
3840 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static DropUserMappingStmt* _copyDropUserMappingStmt ( const DropUserMappingStmt from)
static

Definition at line 3982 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, makeNode, and user.

Referenced by copyObject().

3983 {
3985 
3987  COPY_STRING_FIELD(servername);
3988  COPY_SCALAR_FIELD(missing_ok);
3989 
3990  return newnode;
3991 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static char * user
Definition: pg_regress.c:92
static ExecuteStmt* _copyExecuteStmt ( const ExecuteStmt from)
static

Definition at line 4246 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObject().

4247 {
4248  ExecuteStmt *newnode = makeNode(ExecuteStmt);
4249 
4251  COPY_NODE_FIELD(params);
4252 
4253  return newnode;
4254 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
const char * name
Definition: encode.c:521
static ExplainStmt* _copyExplainStmt ( const ExplainStmt from)
static

Definition at line 3703 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

3704 {
3705  ExplainStmt *newnode = makeNode(ExplainStmt);
3706 
3707  COPY_NODE_FIELD(query);
3709 
3710  return newnode;
3711 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static ExtensibleNode* _copyExtensibleNode ( const ExtensibleNode from)
static

Definition at line 4518 of file copyfuncs.c.

References COPY_STRING_FIELD, ExtensibleNode::extnodename, GetExtensibleNodeMethods(), newNode, ExtensibleNodeMethods::node_size, ExtensibleNodeMethods::nodeCopy, and T_ExtensibleNode.

Referenced by copyObject().

4519 {
4520  ExtensibleNode *newnode;
4521  const ExtensibleNodeMethods *methods;
4522 
4523  methods = GetExtensibleNodeMethods(from->extnodename, false);
4524  newnode = (ExtensibleNode *) newNode(methods->node_size,
4526  COPY_STRING_FIELD(extnodename);
4527 
4528  /* copy the private fields */
4529  methods->nodeCopy(newnode, from);
4530 
4531  return newnode;
4532 }
void(* nodeCopy)(struct ExtensibleNode *newnode, const struct ExtensibleNode *oldnode)
Definition: extensible.h:64
#define newNode(size, tag)
Definition: nodes.h:556
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
const char * extnodename
Definition: extensible.h:35
const ExtensibleNodeMethods * GetExtensibleNodeMethods(const char *extnodename, bool missing_ok)
Definition: extensible.c:125
static FetchStmt* _copyFetchStmt ( const FetchStmt from)
static

Definition at line 3290 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3291 {
3292  FetchStmt *newnode = makeNode(FetchStmt);
3293 
3294  COPY_SCALAR_FIELD(direction);
3295  COPY_SCALAR_FIELD(howMany);
3296  COPY_STRING_FIELD(portalname);
3297  COPY_SCALAR_FIELD(ismove);
3298 
3299  return newnode;
3300 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static FieldSelect* _copyFieldSelect ( const FieldSelect from)
static

Definition at line 1602 of file copyfuncs.c.

References arg, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1603 {
1604  FieldSelect *newnode = makeNode(FieldSelect);
1605 
1607  COPY_SCALAR_FIELD(fieldnum);
1608  COPY_SCALAR_FIELD(resulttype);
1609  COPY_SCALAR_FIELD(resulttypmod);
1610  COPY_SCALAR_FIELD(resultcollid);
1611 
1612  return newnode;
1613 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
void * arg
static FieldStore* _copyFieldStore ( const FieldStore from)
static

Definition at line 1619 of file copyfuncs.c.

References arg, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1620 {
1621  FieldStore *newnode = makeNode(FieldStore);
1622 
1624  COPY_NODE_FIELD(newvals);
1625  COPY_NODE_FIELD(fieldnums);
1626  COPY_SCALAR_FIELD(resulttype);
1627 
1628  return newnode;
1629 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
void * arg
static ForeignKeyCacheInfo* _copyForeignKeyCacheInfo ( const ForeignKeyCacheInfo from)
static

Definition at line 4569 of file copyfuncs.c.

References ForeignKeyCacheInfo::confkey, ForeignKeyCacheInfo::conkey, ForeignKeyCacheInfo::conpfeqop, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

4570 {
4572 
4573  COPY_SCALAR_FIELD(conrelid);
4574  COPY_SCALAR_FIELD(confrelid);
4575  COPY_SCALAR_FIELD(nkeys);
4576  /* COPY_SCALAR_FIELD might work for these, but let's not assume that */
4577  memcpy(newnode->conkey, from->conkey, sizeof(newnode->conkey));
4578  memcpy(newnode->confkey, from->confkey, sizeof(newnode->confkey));
4579  memcpy(newnode->conpfeqop, from->conpfeqop, sizeof(newnode->conpfeqop));
4580 
4581  return newnode;
4582 }
AttrNumber conkey[INDEX_MAX_KEYS]
Definition: rel.h:239
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define makeNode(_type_)
Definition: nodes.h:566
Oid conpfeqop[INDEX_MAX_KEYS]
Definition: rel.h:241
AttrNumber confkey[INDEX_MAX_KEYS]
Definition: rel.h:240
static ForeignScan* _copyForeignScan ( const ForeignScan from)
static

Definition at line 710 of file copyfuncs.c.

References COPY_BITMAPSET_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObject().

711 {
712  ForeignScan *newnode = makeNode(ForeignScan);
713 
714  /*
715  * copy node superclass fields
716  */
717  CopyScanFields((const Scan *) from, (Scan *) newnode);
718 
719  /*
720  * copy remainder of node
721  */
722  COPY_SCALAR_FIELD(operation);
723  COPY_SCALAR_FIELD(fs_server);
724  COPY_NODE_FIELD(fdw_exprs);
725  COPY_NODE_FIELD(fdw_private);
726  COPY_NODE_FIELD(fdw_scan_tlist);
727  COPY_NODE_FIELD(fdw_recheck_quals);
728  COPY_BITMAPSET_FIELD(fs_relids);
729  COPY_SCALAR_FIELD(fsSystemCol);
730 
731  return newnode;
732 }
#define COPY_BITMAPSET_FIELD(fldname)
Definition: copyfuncs.c:49
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:400
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static FromExpr* _copyFromExpr ( const FromExpr from)
static

Definition at line 2056 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

2057 {
2058  FromExpr *newnode = makeNode(FromExpr);
2059 
2060  COPY_NODE_FIELD(fromlist);
2061  COPY_NODE_FIELD(quals);
2062 
2063  return newnode;
2064 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static FuncCall* _copyFuncCall ( const FuncCall from)
static

Definition at line 2511 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

2512 {
2513  FuncCall *newnode = makeNode(FuncCall);
2514 
2515  COPY_NODE_FIELD(funcname);
2517  COPY_NODE_FIELD(agg_order);
2518  COPY_NODE_FIELD(agg_filter);
2519  COPY_SCALAR_FIELD(agg_within_group);
2520  COPY_SCALAR_FIELD(agg_star);
2521  COPY_SCALAR_FIELD(agg_distinct);
2522  COPY_SCALAR_FIELD(func_variadic);
2523  COPY_NODE_FIELD(over);
2524  COPY_LOCATION_FIELD(location);
2525 
2526  return newnode;
2527 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static FuncExpr* _copyFuncExpr ( const FuncExpr from)
static

Definition at line 1413 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1414 {
1415  FuncExpr *newnode = makeNode(FuncExpr);
1416 
1417  COPY_SCALAR_FIELD(funcid);
1418  COPY_SCALAR_FIELD(funcresulttype);
1419  COPY_SCALAR_FIELD(funcretset);
1420  COPY_SCALAR_FIELD(funcvariadic);
1421  COPY_SCALAR_FIELD(funcformat);
1422  COPY_SCALAR_FIELD(funccollid);
1423  COPY_SCALAR_FIELD(inputcollid);
1425  COPY_LOCATION_FIELD(location);
1426 
1427  return newnode;
1428 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static FunctionParameter* _copyFunctionParameter ( const FunctionParameter from)
static

Definition at line 3346 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObject().

3347 {
3349 
3351  COPY_NODE_FIELD(argType);
3352  COPY_SCALAR_FIELD(mode);
3353  COPY_NODE_FIELD(defexpr);
3354 
3355  return newnode;
3356 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
const char * name
Definition: encode.c:521
static FunctionScan* _copyFunctionScan ( const FunctionScan from)
static

Definition at line 603 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, CopyScanFields(), functions, and makeNode.

Referenced by copyObject().

604 {
605  FunctionScan *newnode = makeNode(FunctionScan);
606 
607  /*
608  * copy node superclass fields
609  */
610  CopyScanFields((const Scan *) from, (Scan *) newnode);
611 
612  /*
613  * copy remainder of node
614  */
616  COPY_SCALAR_FIELD(funcordinality);
617 
618  return newnode;
619 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:400
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static const struct fns functions
Definition: regcomp.c:299
static Gather* _copyGather ( const Gather from)
static

Definition at line 348 of file copyfuncs.c.

References COPY_SCALAR_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObject().

349 {
350  Gather *newnode = makeNode(Gather);
351 
352  /*
353  * copy node superclass fields
354  */
355  CopyPlanFields((const Plan *) from, (Plan *) newnode);
356 
357  /*
358  * copy remainder of node
359  */
360  COPY_SCALAR_FIELD(num_workers);
361  COPY_SCALAR_FIELD(single_copy);
362  COPY_SCALAR_FIELD(invisible);
363 
364  return newnode;
365 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:566
static GatherMerge* _copyGatherMerge ( const GatherMerge from)
static

Definition at line 371 of file copyfuncs.c.

References COPY_POINTER_FIELD, COPY_SCALAR_FIELD, CopyPlanFields(), makeNode, and GatherMerge::numCols.

Referenced by copyObject().

372 {
373  GatherMerge *newnode = makeNode(GatherMerge);
374 
375  /*
376  * copy node superclass fields
377  */
378  CopyPlanFields((const Plan *) from, (Plan *) newnode);
379 
380  /*
381  * copy remainder of node
382  */
383  COPY_SCALAR_FIELD(num_workers);
384  COPY_SCALAR_FIELD(numCols);
385  COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
386  COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
387  COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
388  COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
389 
390  return newnode;
391 }
unsigned int Oid
Definition: postgres_ext.h:31
#define COPY_POINTER_FIELD(fldname, sz)
Definition: copyfuncs.c:57
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:566
int16 AttrNumber
Definition: attnum.h:21
static GrantRoleStmt* _copyGrantRoleStmt ( const GrantRoleStmt from)
static

Definition at line 3105 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

3106 {
3107  GrantRoleStmt *newnode = makeNode(GrantRoleStmt);
3108 
3109  COPY_NODE_FIELD(granted_roles);
3110  COPY_NODE_FIELD(grantee_roles);
3111  COPY_SCALAR_FIELD(is_grant);
3112  COPY_SCALAR_FIELD(admin_opt);
3113  COPY_NODE_FIELD(grantor);
3114  COPY_SCALAR_FIELD(behavior);
3115 
3116  return newnode;
3117 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static GrantStmt* _copyGrantStmt ( const GrantStmt from)
static

Definition at line 3065 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

3066 {
3067  GrantStmt *newnode = makeNode(GrantStmt);
3068 
3069  COPY_SCALAR_FIELD(is_grant);
3070  COPY_SCALAR_FIELD(targtype);
3071  COPY_SCALAR_FIELD(objtype);
3072  COPY_NODE_FIELD(objects);
3073  COPY_NODE_FIELD(privileges);
3074  COPY_NODE_FIELD(grantees);
3075  COPY_SCALAR_FIELD(grant_option);
3076  COPY_SCALAR_FIELD(behavior);
3077 
3078  return newnode;
3079 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static Group* _copyGroup ( const Group from)
static

Definition at line 918 of file copyfuncs.c.

References COPY_POINTER_FIELD, COPY_SCALAR_FIELD, CopyPlanFields(), makeNode, and Group::numCols.

Referenced by copyObject().

919 {
920  Group *newnode = makeNode(Group);
921 
922  CopyPlanFields((const Plan *) from, (Plan *) newnode);
923 
924  COPY_SCALAR_FIELD(numCols);
925  COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
926  COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
927 
928  return newnode;
929 }
unsigned int Oid
Definition: postgres_ext.h:31
#define COPY_POINTER_FIELD(fldname, sz)
Definition: copyfuncs.c:57
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
int numCols
Definition: plannodes.h:732
#define makeNode(_type_)
Definition: nodes.h:566
int16 AttrNumber
Definition: attnum.h:21
static GroupingFunc* _copyGroupingFunc ( const GroupingFunc from)
static

Definition at line 1354 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1355 {
1356  GroupingFunc *newnode = makeNode(GroupingFunc);
1357 
1359  COPY_NODE_FIELD(refs);
1360  COPY_NODE_FIELD(cols);
1361  COPY_SCALAR_FIELD(agglevelsup);
1362  COPY_LOCATION_FIELD(location);
1363 
1364  return newnode;
1365 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static GroupingSet* _copyGroupingSet ( const GroupingSet from)
static

Definition at line 2343 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

2344 {
2345  GroupingSet *newnode = makeNode(GroupingSet);
2346 
2347  COPY_SCALAR_FIELD(kind);
2348  COPY_NODE_FIELD(content);
2349  COPY_LOCATION_FIELD(location);
2350 
2351  return newnode;
2352 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static Hash* _copyHash ( const Hash from)
static

Definition at line 1014 of file copyfuncs.c.

References COPY_SCALAR_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObject().

1015 {
1016  Hash *newnode = makeNode(Hash);
1017 
1018  /*
1019  * copy node superclass fields
1020  */
1021  CopyPlanFields((const Plan *) from, (Plan *) newnode);
1022 
1023  /*
1024  * copy remainder of node
1025  */
1026  COPY_SCALAR_FIELD(skewTable);
1027  COPY_SCALAR_FIELD(skewColumn);
1028  COPY_SCALAR_FIELD(skewInherit);
1029  COPY_SCALAR_FIELD(skewColType);
1030  COPY_SCALAR_FIELD(skewColTypmod);
1031 
1032  return newnode;
1033 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:566
static HashJoin* _copyHashJoin ( const HashJoin from)
static

Definition at line 856 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyJoinFields(), and makeNode.

Referenced by copyObject().

857 {
858  HashJoin *newnode = makeNode(HashJoin);
859 
860  /*
861  * copy node superclass fields
862  */
863  CopyJoinFields((const Join *) from, (Join *) newnode);
864 
865  /*
866  * copy remainder of node
867  */
868  COPY_NODE_FIELD(hashclauses);
869 
870  return newnode;
871 }
static void CopyJoinFields(const Join *from, Join *newnode)
Definition: copyfuncs.c:774
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static ImportForeignSchemaStmt* _copyImportForeignSchemaStmt ( const ImportForeignSchemaStmt from)
static

Definition at line 4007 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

4008 {
4010 
4011  COPY_STRING_FIELD(server_name);
4012  COPY_STRING_FIELD(remote_schema);
4013  COPY_STRING_FIELD(local_schema);
4014  COPY_SCALAR_FIELD(list_type);
4015  COPY_NODE_FIELD(table_list);
4017 
4018  return newnode;
4019 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static IndexElem* _copyIndexElem ( const IndexElem from)
static

Definition at line 2742 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObject().

2743 {
2744  IndexElem *newnode = makeNode(IndexElem);
2745 
2747  COPY_NODE_FIELD(expr);
2748  COPY_STRING_FIELD(indexcolname);
2749  COPY_NODE_FIELD(collation);
2750  COPY_NODE_FIELD(opclass);
2751  COPY_SCALAR_FIELD(ordering);
2752  COPY_SCALAR_FIELD(nulls_ordering);
2753 
2754  return newnode;
2755 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
const char * name
Definition: encode.c:521
static IndexOnlyScan* _copyIndexOnlyScan ( const IndexOnlyScan from)
static

Definition at line 491 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObject().

492 {
494 
495  /*
496  * copy node superclass fields
497  */
498  CopyScanFields((const Scan *) from, (Scan *) newnode);
499 
500  /*
501  * copy remainder of node
502  */
503  COPY_SCALAR_FIELD(indexid);
504  COPY_NODE_FIELD(indexqual);
505  COPY_NODE_FIELD(indexorderby);
506  COPY_NODE_FIELD(indextlist);
507  COPY_SCALAR_FIELD(indexorderdir);
508 
509  return newnode;
510 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:400
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static IndexScan* _copyIndexScan ( const IndexScan from)
static

Definition at line 464 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObject().

465 {
466  IndexScan *newnode = makeNode(IndexScan);
467 
468  /*
469  * copy node superclass fields
470  */
471  CopyScanFields((const Scan *) from, (Scan *) newnode);
472 
473  /*
474  * copy remainder of node
475  */
476  COPY_SCALAR_FIELD(indexid);
477  COPY_NODE_FIELD(indexqual);
478  COPY_NODE_FIELD(indexqualorig);
479  COPY_NODE_FIELD(indexorderby);
480  COPY_NODE_FIELD(indexorderbyorig);
481  COPY_NODE_FIELD(indexorderbyops);
482  COPY_SCALAR_FIELD(indexorderdir);
483 
484  return newnode;
485 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:400
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static IndexStmt* _copyIndexStmt ( const IndexStmt from)
static

Definition at line 3303 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3304 {
3305  IndexStmt *newnode = makeNode(IndexStmt);
3306 
3307  COPY_STRING_FIELD(idxname);
3308  COPY_NODE_FIELD(relation);
3309  COPY_STRING_FIELD(accessMethod);
3310  COPY_STRING_FIELD(tableSpace);
3311  COPY_NODE_FIELD(indexParams);
3313  COPY_NODE_FIELD(whereClause);
3314  COPY_NODE_FIELD(excludeOpNames);
3315  COPY_STRING_FIELD(idxcomment);
3316  COPY_SCALAR_FIELD(indexOid);
3317  COPY_SCALAR_FIELD(oldNode);
3318  COPY_SCALAR_FIELD(unique);
3319  COPY_SCALAR_FIELD(primary);
3320  COPY_SCALAR_FIELD(isconstraint);
3321  COPY_SCALAR_FIELD(deferrable);
3322  COPY_SCALAR_FIELD(initdeferred);
3323  COPY_SCALAR_FIELD(transformed);
3324  COPY_SCALAR_FIELD(concurrent);
3325  COPY_SCALAR_FIELD(if_not_exists);
3326 
3327  return newnode;
3328 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static InferClause* _copyInferClause ( const InferClause from)
static

Definition at line 2398 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

2399 {
2400  InferClause *newnode = makeNode(InferClause);
2401 
2402  COPY_NODE_FIELD(indexElems);
2403  COPY_NODE_FIELD(whereClause);
2404  COPY_STRING_FIELD(conname);
2405  COPY_LOCATION_FIELD(location);
2406 
2407  return newnode;
2408 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static InferenceElem* _copyInferenceElem ( const InferenceElem from)
static

Definition at line 1989 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1990 {
1991  InferenceElem *newnode = makeNode(InferenceElem);
1992 
1993  COPY_NODE_FIELD(expr);
1994  COPY_SCALAR_FIELD(infercollid);
1995  COPY_SCALAR_FIELD(inferopclass);
1996 
1997  return newnode;
1998 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static InsertStmt* _copyInsertStmt ( const InsertStmt from)
static

Definition at line 2934 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObject().

2935 {
2936  InsertStmt *newnode = makeNode(InsertStmt);
2937 
2938  COPY_NODE_FIELD(relation);
2939  COPY_NODE_FIELD(cols);
2940  COPY_NODE_FIELD(selectStmt);
2941  COPY_NODE_FIELD(onConflictClause);
2942  COPY_NODE_FIELD(returningList);
2943  COPY_NODE_FIELD(withClause);
2944 
2945  return newnode;
2946 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static IntoClause* _copyIntoClause ( const IntoClause from)
static

Definition at line 1222 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

1223 {
1224  IntoClause *newnode = makeNode(IntoClause);
1225 
1226  COPY_NODE_FIELD(rel);
1227  COPY_NODE_FIELD(colNames);
1229  COPY_SCALAR_FIELD(onCommit);
1230  COPY_STRING_FIELD(tableSpaceName);
1231  COPY_NODE_FIELD(viewQuery);
1232  COPY_SCALAR_FIELD(skipData);
1233 
1234  return newnode;
1235 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static Join* _copyJoin ( const Join from)
static

Definition at line 787 of file copyfuncs.c.

References CopyJoinFields(), and makeNode.

Referenced by copyObject().

788 {
789  Join *newnode = makeNode(Join);
790 
791  /*
792  * copy node superclass fields
793  */
794  CopyJoinFields(from, newnode);
795 
796  return newnode;
797 }
static void CopyJoinFields(const Join *from, Join *newnode)
Definition: copyfuncs.c:774
#define makeNode(_type_)
Definition: nodes.h:566
static JoinExpr* _copyJoinExpr ( const JoinExpr from)
static

Definition at line 2036 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

2037 {
2038  JoinExpr *newnode = makeNode(JoinExpr);
2039 
2040  COPY_SCALAR_FIELD(jointype);
2041  COPY_SCALAR_FIELD(isNatural);
2042  COPY_NODE_FIELD(larg);
2043  COPY_NODE_FIELD(rarg);
2044  COPY_NODE_FIELD(usingClause);
2045  COPY_NODE_FIELD(quals);
2046  COPY_NODE_FIELD(alias);
2047  COPY_SCALAR_FIELD(rtindex);
2048 
2049  return newnode;
2050 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static Limit* _copyLimit ( const Limit from)
static

Definition at line 1089 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObject().

1090 {
1091  Limit *newnode = makeNode(Limit);
1092 
1093  /*
1094  * copy node superclass fields
1095  */
1096  CopyPlanFields((const Plan *) from, (Plan *) newnode);
1097 
1098  /*
1099  * copy remainder of node
1100  */
1101  COPY_NODE_FIELD(limitOffset);
1102  COPY_NODE_FIELD(limitCount);
1103 
1104  return newnode;
1105 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:566
static List* _copyList ( const List from)
static

Definition at line 4486 of file copyfuncs.c.

References Assert, COPY_NODE_CELL, List::head, List::length, list_length(), lnext, makeNode, ListCell::next, and NULL.

Referenced by copyObject().

4487 {
4488  List *new;
4489  ListCell *curr_old;
4490  ListCell *prev_new;
4491 
4492  Assert(list_length(from) >= 1);
4493 
4494  new = makeNode(List);
4495  new->length = from->length;
4496 
4497  COPY_NODE_CELL(new->head, from->head);
4498  prev_new = new->head;
4499  curr_old = lnext(from->head);
4500 
4501  while (curr_old)
4502  {
4503  COPY_NODE_CELL(prev_new->next, curr_old);
4504  prev_new = prev_new->next;
4505  curr_old = curr_old->next;
4506  }
4507  prev_new->next = NULL;
4508  new->tail = prev_new;
4509 
4510  return new;
4511 }
#define lnext(lc)
Definition: pg_list.h:105
#define COPY_NODE_CELL(new, old)
Definition: copyfuncs.c:4481
#define makeNode(_type_)
Definition: nodes.h:566
ListCell * next
Definition: pg_list.h:61
#define NULL
Definition: c.h:229
#define Assert(condition)
Definition: c.h:675
static int list_length(const List *l)
Definition: pg_list.h:89
int length
Definition: pg_list.h:48
ListCell * head
Definition: pg_list.h:49
Definition: pg_list.h:45
static ListenStmt* _copyListenStmt ( const ListenStmt from)
static

Definition at line 3475 of file copyfuncs.c.

References COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3476 {
3477  ListenStmt *newnode = makeNode(ListenStmt);
3478 
3479  COPY_STRING_FIELD(conditionname);
3480 
3481  return newnode;
3482 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static LoadStmt* _copyLoadStmt ( const LoadStmt from)
static

Definition at line 3570 of file copyfuncs.c.

References COPY_STRING_FIELD, filename, and makeNode.

Referenced by copyObject().

3571 {
3572  LoadStmt *newnode = makeNode(LoadStmt);
3573 
3575 
3576  return newnode;
3577 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static char * filename
Definition: pg_dumpall.c:87
static LockingClause* _copyLockingClause ( const LockingClause from)
static

Definition at line 2829 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

2830 {
2831  LockingClause *newnode = makeNode(LockingClause);
2832 
2833  COPY_NODE_FIELD(lockedRels);
2834  COPY_SCALAR_FIELD(strength);
2835  COPY_SCALAR_FIELD(waitPolicy);
2836 
2837  return newnode;
2838 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static LockRows* _copyLockRows ( const LockRows from)
static

Definition at line 1067 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObject().

1068 {
1069  LockRows *newnode = makeNode(LockRows);
1070 
1071  /*
1072  * copy node superclass fields
1073  */
1074  CopyPlanFields((const Plan *) from, (Plan *) newnode);
1075 
1076  /*
1077  * copy remainder of node
1078  */
1079  COPY_NODE_FIELD(rowMarks);
1080  COPY_SCALAR_FIELD(epqParam);
1081 
1082  return newnode;
1083 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:566
static LockStmt* _copyLockStmt ( const LockStmt from)
static

Definition at line 4157 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

4158 {
4159  LockStmt *newnode = makeNode(LockStmt);
4160 
4161  COPY_NODE_FIELD(relations);
4162  COPY_SCALAR_FIELD(mode);
4163  COPY_SCALAR_FIELD(nowait);
4164 
4165  return newnode;
4166 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static Material* _copyMaterial ( const Material from)
static

Definition at line 878 of file copyfuncs.c.

References CopyPlanFields(), and makeNode.

Referenced by copyObject().

879 {
880  Material *newnode = makeNode(Material);
881 
882  /*
883  * copy node superclass fields
884  */
885  CopyPlanFields((const Plan *) from, (Plan *) newnode);
886 
887  return newnode;
888 }
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:566
static MergeAppend* _copyMergeAppend ( const MergeAppend from)
static

Definition at line 250 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_POINTER_FIELD, COPY_SCALAR_FIELD, CopyPlanFields(), makeNode, and MergeAppend::numCols.

Referenced by copyObject().

251 {
252  MergeAppend *newnode = makeNode(MergeAppend);
253 
254  /*
255  * copy node superclass fields
256  */
257  CopyPlanFields((const Plan *) from, (Plan *) newnode);
258 
259  /*
260  * copy remainder of node
261  */
262  COPY_NODE_FIELD(partitioned_rels);
263  COPY_NODE_FIELD(mergeplans);
264  COPY_SCALAR_FIELD(numCols);
265  COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
266  COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
267  COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
268  COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
269 
270  return newnode;
271 }
unsigned int Oid
Definition: postgres_ext.h:31
#define COPY_POINTER_FIELD(fldname, sz)
Definition: copyfuncs.c:57
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:566
int16 AttrNumber
Definition: attnum.h:21
static MergeJoin* _copyMergeJoin ( const MergeJoin from)
static

Definition at line 826 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_POINTER_FIELD, CopyJoinFields(), list_length(), makeNode, and MergeJoin::mergeclauses.

Referenced by copyObject().

827 {
828  MergeJoin *newnode = makeNode(MergeJoin);
829  int numCols;
830 
831  /*
832  * copy node superclass fields
833  */
834  CopyJoinFields((const Join *) from, (Join *) newnode);
835 
836  /*
837  * copy remainder of node
838  */
839  COPY_NODE_FIELD(mergeclauses);
840  numCols = list_length(from->mergeclauses);
841  if (numCols > 0)
842  {
843  COPY_POINTER_FIELD(mergeFamilies, numCols * sizeof(Oid));
844  COPY_POINTER_FIELD(mergeCollations, numCols * sizeof(Oid));
845  COPY_POINTER_FIELD(mergeStrategies, numCols * sizeof(int));
846  COPY_POINTER_FIELD(mergeNullsFirst, numCols * sizeof(bool));
847  }
848 
849  return newnode;
850 }
unsigned int Oid
Definition: postgres_ext.h:31
List * mergeclauses
Definition: plannodes.h:682
static void CopyJoinFields(const Join *from, Join *newnode)
Definition: copyfuncs.c:774
#define COPY_POINTER_FIELD(fldname, sz)
Definition: copyfuncs.c:57
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static int list_length(const List *l)
Definition: pg_list.h:89
static MinMaxExpr* _copyMinMaxExpr ( const MinMaxExpr from)
static

Definition at line 1838 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1839 {
1840  MinMaxExpr *newnode = makeNode(MinMaxExpr);
1841 
1842  COPY_SCALAR_FIELD(minmaxtype);
1843  COPY_SCALAR_FIELD(minmaxcollid);
1844  COPY_SCALAR_FIELD(inputcollid);
1845  COPY_SCALAR_FIELD(op);
1847  COPY_LOCATION_FIELD(location);
1848 
1849  return newnode;
1850 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
static ModifyTable* _copyModifyTable ( const ModifyTable from)
static

Definition at line 189 of file copyfuncs.c.

References COPY_BITMAPSET_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObject().

190 {
191  ModifyTable *newnode = makeNode(ModifyTable);
192 
193  /*
194  * copy node superclass fields
195  */
196  CopyPlanFields((const Plan *) from, (Plan *) newnode);
197 
198  /*
199  * copy remainder of node
200  */
201  COPY_SCALAR_FIELD(operation);
202  COPY_SCALAR_FIELD(canSetTag);
203  COPY_SCALAR_FIELD(nominalRelation);
204  COPY_NODE_FIELD(partitioned_rels);
205  COPY_NODE_FIELD(resultRelations);
206  COPY_SCALAR_FIELD(resultRelIndex);
207  COPY_NODE_FIELD(plans);
208  COPY_NODE_FIELD(withCheckOptionLists);
209  COPY_NODE_FIELD(returningLists);
210  COPY_NODE_FIELD(fdwPrivLists);
211  COPY_BITMAPSET_FIELD(fdwDirectModifyPlans);
212  COPY_NODE_FIELD(rowMarks);
213  COPY_SCALAR_FIELD(epqParam);
214  COPY_SCALAR_FIELD(onConflictAction);
215  COPY_NODE_FIELD(arbiterIndexes);
216  COPY_NODE_FIELD(onConflictSet);
217  COPY_NODE_FIELD(onConflictWhere);
218  COPY_SCALAR_FIELD(exclRelRTI);
219  COPY_NODE_FIELD(exclRelTlist);
220 
221  return newnode;
222 }
#define COPY_BITMAPSET_FIELD(fldname)
Definition: copyfuncs.c:49
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:566
static MultiAssignRef* _copyMultiAssignRef ( const MultiAssignRef from)
static

Definition at line 2585 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

2586 {
2588 
2589  COPY_NODE_FIELD(source);
2590  COPY_SCALAR_FIELD(colno);
2591  COPY_SCALAR_FIELD(ncolumns);
2592 
2593  return newnode;
2594 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static NamedArgExpr* _copyNamedArgExpr ( const NamedArgExpr from)
static

Definition at line 1434 of file copyfuncs.c.

References arg, COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObject().

1435 {
1436  NamedArgExpr *newnode = makeNode(NamedArgExpr);
1437 
1440  COPY_SCALAR_FIELD(argnumber);
1441  COPY_LOCATION_FIELD(location);
1442 
1443  return newnode;
1444 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:566
const char * name
Definition: encode.c:521
void * arg
static NestLoop* _copyNestLoop ( const NestLoop from)
static

Definition at line 804 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyJoinFields(), and makeNode.

Referenced by copyObject().

805 {
806  NestLoop *newnode = makeNode(NestLoop);
807 
808  /*
809  * copy node superclass fields
810  */
811  CopyJoinFields((const Join *) from, (Join *) newnode);
812 
813  /*
814  * copy remainder of node
815  */
816  COPY_NODE_FIELD(nestParams);
817 
818  return newnode;
819 }
static void CopyJoinFields(const Join *from, Join *newnode)
Definition: copyfuncs.c:774
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static NestLoopParam* _copyNestLoopParam ( const NestLoopParam from)
static

Definition at line 1111 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObject().

1112 {
1113  NestLoopParam *newnode = makeNode(NestLoopParam);
1114 
1115  COPY_SCALAR_FIELD(paramno);
1116  COPY_NODE_FIELD(paramval);
1117 
1118  return newnode;
1119 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:566
static NotifyStmt* _copyNotifyStmt ( const NotifyStmt from)
static

Definition at line 3464 of file copyfuncs.c.

References COPY_STRING_FIELD, and makeNode.

Referenced by copyObject().

3465 {
3466  NotifyStmt *newnode = makeNode(NotifyStmt);
3467 
3468  COPY_STRING_FIELD(conditionname);
3469  COPY_STRING_FIELD(payload);
3470 
3471  return newnode;
3472 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:566
static NullIfExpr* _copyNullIfExpr ( const NullIfExpr from)
static

Definition at line 1490 of file copyfuncs.c.

References gener