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 = copyObjectImpl(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 NamedTuplestoreScan_copyNamedTuplestoreScan (const NamedTuplestoreScan *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 NextValueExpr_copyNextValueExpr (const NextValueExpr *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 AlterCollationStmt_copyAlterCollationStmt (const AlterCollationStmt *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 CreateStatsStmt_copyCreateStatsStmt (const CreateStatsStmt *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 VacuumRelation_copyVacuumRelation (const VacuumRelation *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 PartitionElem_copyPartitionElem (const PartitionElem *from)
 
static PartitionSpec_copyPartitionSpec (const PartitionSpec *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 * copyObjectImpl (const void *from)
 

Macro Definition Documentation

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

Definition at line 4571 of file copyfuncs.c.

Referenced by _copyList().

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

Definition at line 45 of file copyfuncs.c.

Referenced by _copyA_ArrayExpr(), _copyA_Indirection(), _copyAccessPriv(), _copyAExpr(), _copyAgg(), _copyAggref(), _copyAIndices(), _copyAlias(), _copyAlterCollationStmt(), _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(), _copyCreateStatsStmt(), _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(), _copyVacuumRelation(), _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:350
void * palloc(Size size)
Definition: mcxt.c:848

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(), _copyAlterSubscriptionStmt(), _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(), _copyCreateStatsStmt(), _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(), _copyInsertStmt(), _copyIntoClause(), _copyJoinExpr(), _copyLockingClause(), _copyLockRows(), _copyLockStmt(), _copyMergeAppend(), _copyMergeJoin(), _copyMinMaxExpr(), _copyModifyTable(), _copyMultiAssignRef(), _copyNamedArgExpr(), _copyNestLoopParam(), _copyNextValueExpr(), _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(), _copyVacuumRelation(), _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(), _copyNamedTuplestoreScan(), _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 2604 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2605 {
2606  A_ArrayExpr *newnode = makeNode(A_ArrayExpr);
2607 
2608  COPY_NODE_FIELD(elements);
2609  COPY_LOCATION_FIELD(location);
2610 
2611  return newnode;
2612 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:558
static A_Indirection* _copyA_Indirection ( const A_Indirection from)
static

Definition at line 2593 of file copyfuncs.c.

References arg, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2594 {
2595  A_Indirection *newnode = makeNode(A_Indirection);
2596 
2598  COPY_NODE_FIELD(indirection);
2599 
2600  return newnode;
2601 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
void * arg
static AccessPriv* _copyAccessPriv ( const AccessPriv from)
static

Definition at line 3153 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3154 {
3155  AccessPriv *newnode = makeNode(AccessPriv);
3156 
3157  COPY_STRING_FIELD(priv_name);
3158  COPY_NODE_FIELD(cols);
3159 
3160  return newnode;
3161 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static A_Const* _copyAConst ( const A_Const from)
static

Definition at line 2523 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 copyObjectImpl().

2524 {
2525  A_Const *newnode = makeNode(A_Const);
2526 
2527  /* This part must duplicate _copyValue */
2528  COPY_SCALAR_FIELD(val.type);
2529  switch (from->val.type)
2530  {
2531  case T_Integer:
2532  COPY_SCALAR_FIELD(val.val.ival);
2533  break;
2534  case T_Float:
2535  case T_String:
2536  case T_BitString:
2537  COPY_STRING_FIELD(val.val.str);
2538  break;
2539  case T_Null:
2540  /* nothing to do */
2541  break;
2542  default:
2543  elog(ERROR, "unrecognized node type: %d",
2544  (int) from->val.type);
2545  break;
2546  }
2547 
2548  COPY_LOCATION_FIELD(location);
2549 
2550  return newnode;
2551 }
#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:558
Definition: nodes.h:286
Definition: nodes.h:283
#define elog
Definition: elog.h:219
Value val
Definition: parsenodes.h:287
long val
Definition: informix.c:689
NodeTag type
Definition: value.h:44
static A_Expr* _copyAExpr ( const A_Expr from)
static

Definition at line 2487 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2488 {
2489  A_Expr *newnode = makeNode(A_Expr);
2490 
2491  COPY_SCALAR_FIELD(kind);
2493  COPY_NODE_FIELD(lexpr);
2494  COPY_NODE_FIELD(rexpr);
2495  COPY_LOCATION_FIELD(location);
2496 
2497  return newnode;
2498 }
#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:558
const char * name
Definition: encode.c:521
static Agg* _copyAgg ( const Agg from)
static

Definition at line 963 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

964 {
965  Agg *newnode = makeNode(Agg);
966 
967  CopyPlanFields((const Plan *) from, (Plan *) newnode);
968 
969  COPY_SCALAR_FIELD(aggstrategy);
970  COPY_SCALAR_FIELD(aggsplit);
971  COPY_SCALAR_FIELD(numCols);
972  if (from->numCols > 0)
973  {
974  COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
975  COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
976  }
977  COPY_SCALAR_FIELD(numGroups);
978  COPY_BITMAPSET_FIELD(aggParams);
979  COPY_NODE_FIELD(groupingSets);
980  COPY_NODE_FIELD(chain);
981 
982  return newnode;
983 }
#define COPY_BITMAPSET_FIELD(fldname)
Definition: copyfuncs.c:49
int numCols
Definition: plannodes.h:785
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:115
#define makeNode(_type_)
Definition: nodes.h:558
Definition: plannodes.h:780
int16 AttrNumber
Definition: attnum.h:21
static Aggref* _copyAggref ( const Aggref from)
static

Definition at line 1351 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1352 {
1353  Aggref *newnode = makeNode(Aggref);
1354 
1355  COPY_SCALAR_FIELD(aggfnoid);
1356  COPY_SCALAR_FIELD(aggtype);
1357  COPY_SCALAR_FIELD(aggcollid);
1358  COPY_SCALAR_FIELD(inputcollid);
1359  COPY_SCALAR_FIELD(aggtranstype);
1360  COPY_NODE_FIELD(aggargtypes);
1361  COPY_NODE_FIELD(aggdirectargs);
1363  COPY_NODE_FIELD(aggorder);
1364  COPY_NODE_FIELD(aggdistinct);
1365  COPY_NODE_FIELD(aggfilter);
1366  COPY_SCALAR_FIELD(aggstar);
1367  COPY_SCALAR_FIELD(aggvariadic);
1368  COPY_SCALAR_FIELD(aggkind);
1369  COPY_SCALAR_FIELD(agglevelsup);
1370  COPY_SCALAR_FIELD(aggsplit);
1371  COPY_LOCATION_FIELD(location);
1372 
1373  return newnode;
1374 }
#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:558
static A_Indices* _copyAIndices ( const A_Indices from)
static

Definition at line 2581 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2582 {
2583  A_Indices *newnode = makeNode(A_Indices);
2584 
2585  COPY_SCALAR_FIELD(is_slice);
2586  COPY_NODE_FIELD(lidx);
2587  COPY_NODE_FIELD(uidx);
2588 
2589  return newnode;
2590 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static Alias* _copyAlias ( const Alias from)
static

Definition at line 1190 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

1191 {
1192  Alias *newnode = makeNode(Alias);
1193 
1194  COPY_STRING_FIELD(aliasname);
1195  COPY_NODE_FIELD(colnames);
1196 
1197  return newnode;
1198 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static AlterCollationStmt* _copyAlterCollationStmt ( const AlterCollationStmt from)
static

Definition at line 3099 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3100 {
3102 
3103  COPY_NODE_FIELD(collname);
3104 
3105  return newnode;
3106 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlterDatabaseSetStmt* _copyAlterDatabaseSetStmt ( const AlterDatabaseSetStmt from)
static

Definition at line 3742 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObjectImpl().

3743 {
3745 
3747  COPY_NODE_FIELD(setstmt);
3748 
3749  return newnode;
3750 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
char * dbname
Definition: streamutil.c:42
static AlterDatabaseStmt* _copyAlterDatabaseStmt ( const AlterDatabaseStmt from)
static

Definition at line 3731 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObjectImpl().

3732 {
3734 
3737 
3738  return newnode;
3739 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
char * dbname
Definition: streamutil.c:42
static AlterDefaultPrivilegesStmt* _copyAlterDefaultPrivilegesStmt ( const AlterDefaultPrivilegesStmt from)
static

Definition at line 3179 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3180 {
3182 
3184  COPY_NODE_FIELD(action);
3185 
3186  return newnode;
3187 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlterDomainStmt* _copyAlterDomainStmt ( const AlterDomainStmt from)
static

Definition at line 3109 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3110 {
3112 
3113  COPY_SCALAR_FIELD(subtype);
3114  COPY_NODE_FIELD(typeName);
3116  COPY_NODE_FIELD(def);
3117  COPY_SCALAR_FIELD(behavior);
3118  COPY_SCALAR_FIELD(missing_ok);
3119 
3120  return newnode;
3121 }
#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:558
const char * name
Definition: encode.c:521
static AlterEnumStmt* _copyAlterEnumStmt ( const AlterEnumStmt from)
static

Definition at line 3613 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3614 {
3615  AlterEnumStmt *newnode = makeNode(AlterEnumStmt);
3616 
3617  COPY_NODE_FIELD(typeName);
3618  COPY_STRING_FIELD(oldVal);
3619  COPY_STRING_FIELD(newVal);
3620  COPY_STRING_FIELD(newValNeighbor);
3621  COPY_SCALAR_FIELD(newValIsAfter);
3622  COPY_SCALAR_FIELD(skipIfNewValExists);
3623 
3624  return newnode;
3625 }
#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:558
static AlterEventTrigStmt* _copyAlterEventTrigStmt ( const AlterEventTrigStmt from)
static

Definition at line 4170 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4171 {
4173 
4174  COPY_STRING_FIELD(trigname);
4175  COPY_SCALAR_FIELD(tgenabled);
4176 
4177  return newnode;
4178 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static AlterExtensionContentsStmt* _copyAlterExtensionContentsStmt ( const AlterExtensionContentsStmt from)
static

Definition at line 3978 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3979 {
3981 
3982  COPY_STRING_FIELD(extname);
3983  COPY_SCALAR_FIELD(action);
3984  COPY_SCALAR_FIELD(objtype);
3985  COPY_NODE_FIELD(object);
3986 
3987  return newnode;
3988 }
#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:558
static AlterExtensionStmt* _copyAlterExtensionStmt ( const AlterExtensionStmt from)
static

Definition at line 3967 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3968 {
3970 
3971  COPY_STRING_FIELD(extname);
3973 
3974  return newnode;
3975 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static AlterFdwStmt* _copyAlterFdwStmt ( const AlterFdwStmt from)
static

Definition at line 4003 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4004 {
4005  AlterFdwStmt *newnode = makeNode(AlterFdwStmt);
4006 
4007  COPY_STRING_FIELD(fdwname);
4008  COPY_NODE_FIELD(func_options);
4010 
4011  return newnode;
4012 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static AlterForeignServerStmt* _copyAlterForeignServerStmt ( const AlterForeignServerStmt from)
static

Definition at line 4030 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4031 {
4033 
4034  COPY_STRING_FIELD(servername);
4035  COPY_STRING_FIELD(version);
4037  COPY_SCALAR_FIELD(has_version);
4038 
4039  return newnode;
4040 }
#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:558
static AlterFunctionStmt* _copyAlterFunctionStmt ( const AlterFunctionStmt from)
static

Definition at line 3432 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3433 {
3435 
3436  COPY_NODE_FIELD(func);
3437  COPY_NODE_FIELD(actions);
3438 
3439  return newnode;
3440 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlternativeSubPlan* _copyAlternativeSubPlan ( const AlternativeSubPlan from)
static

Definition at line 1615 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

1616 {
1618 
1619  COPY_NODE_FIELD(subplans);
1620 
1621  return newnode;
1622 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlterObjectDependsStmt* _copyAlterObjectDependsStmt ( const AlterObjectDependsStmt from)
static

Definition at line 3470 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3471 {
3473 
3474  COPY_SCALAR_FIELD(objectType);
3475  COPY_NODE_FIELD(relation);
3476  COPY_NODE_FIELD(object);
3477  COPY_NODE_FIELD(extname);
3478 
3479  return newnode;
3480 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlterObjectSchemaStmt* _copyAlterObjectSchemaStmt ( const AlterObjectSchemaStmt from)
static

Definition at line 3483 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3484 {
3486 
3487  COPY_SCALAR_FIELD(objectType);
3488  COPY_NODE_FIELD(relation);
3489  COPY_NODE_FIELD(object);
3490  COPY_STRING_FIELD(newschema);
3491  COPY_SCALAR_FIELD(missing_ok);
3492 
3493  return newnode;
3494 }
#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:558
static AlterOperatorStmt* _copyAlterOperatorStmt ( const AlterOperatorStmt from)
static

Definition at line 3510 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3511 {
3513 
3514  COPY_NODE_FIELD(opername);
3516 
3517  return newnode;
3518 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlterOpFamilyStmt* _copyAlterOpFamilyStmt ( const AlterOpFamilyStmt from)
static

Definition at line 3707 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3708 {
3710 
3711  COPY_NODE_FIELD(opfamilyname);
3712  COPY_STRING_FIELD(amname);
3713  COPY_SCALAR_FIELD(isDrop);
3714  COPY_NODE_FIELD(items);
3715 
3716  return newnode;
3717 }
#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:558
static AlterOwnerStmt* _copyAlterOwnerStmt ( const AlterOwnerStmt from)
static

Definition at line 3497 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3498 {
3500 
3501  COPY_SCALAR_FIELD(objectType);
3502  COPY_NODE_FIELD(relation);
3503  COPY_NODE_FIELD(object);
3504  COPY_NODE_FIELD(newowner);
3505 
3506  return newnode;
3507 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlterPolicyStmt* _copyAlterPolicyStmt ( const AlterPolicyStmt from)
static

Definition at line 4418 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4419 {
4421 
4422  COPY_STRING_FIELD(policy_name);
4423  COPY_NODE_FIELD(table);
4424  COPY_NODE_FIELD(roles);
4425  COPY_NODE_FIELD(qual);
4426  COPY_NODE_FIELD(with_check);
4427 
4428  return newnode;
4429 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static AlterPublicationStmt* _copyAlterPublicationStmt ( const AlterPublicationStmt from)
static

Definition at line 4509 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4510 {
4512 
4513  COPY_STRING_FIELD(pubname);
4515  COPY_NODE_FIELD(tables);
4516  COPY_SCALAR_FIELD(for_all_tables);
4517  COPY_SCALAR_FIELD(tableAction);
4518 
4519  return newnode;
4520 }
#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:558
static AlterRoleSetStmt* _copyAlterRoleSetStmt ( const AlterRoleSetStmt from)
static

Definition at line 4220 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4221 {
4223 
4224  COPY_NODE_FIELD(role);
4225  COPY_STRING_FIELD(database);
4226  COPY_NODE_FIELD(setstmt);
4227 
4228  return newnode;
4229 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static AlterRoleStmt* _copyAlterRoleStmt ( const AlterRoleStmt from)
static

Definition at line 4208 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4209 {
4210  AlterRoleStmt *newnode = makeNode(AlterRoleStmt);
4211 
4212  COPY_NODE_FIELD(role);
4214  COPY_SCALAR_FIELD(action);
4215 
4216  return newnode;
4217 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlterSeqStmt* _copyAlterSeqStmt ( const AlterSeqStmt from)
static

Definition at line 3859 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3860 {
3861  AlterSeqStmt *newnode = makeNode(AlterSeqStmt);
3862 
3863  COPY_NODE_FIELD(sequence);
3865  COPY_SCALAR_FIELD(for_identity);
3866  COPY_SCALAR_FIELD(missing_ok);
3867 
3868  return newnode;
3869 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlterSubscriptionStmt* _copyAlterSubscriptionStmt ( const AlterSubscriptionStmt from)
static

Definition at line 4536 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4537 {
4539 
4540  COPY_SCALAR_FIELD(kind);
4541  COPY_STRING_FIELD(subname);
4542  COPY_STRING_FIELD(conninfo);
4543  COPY_NODE_FIELD(publication);
4545 
4546  return newnode;
4547 }
#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:558
static AlterSystemStmt* _copyAlterSystemStmt ( const AlterSystemStmt from)
static

Definition at line 3835 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3836 {
3838 
3839  COPY_NODE_FIELD(setstmt);
3840 
3841  return newnode;
3842 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlterTableCmd* _copyAlterTableCmd ( const AlterTableCmd from)
static

Definition at line 3083 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3084 {
3085  AlterTableCmd *newnode = makeNode(AlterTableCmd);
3086 
3087  COPY_SCALAR_FIELD(subtype);
3089  COPY_SCALAR_FIELD(num);
3090  COPY_NODE_FIELD(newowner);
3091  COPY_NODE_FIELD(def);
3092  COPY_SCALAR_FIELD(behavior);
3093  COPY_SCALAR_FIELD(missing_ok);
3094 
3095  return newnode;
3096 }
#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:558
const char * name
Definition: encode.c:521
static AlterTableMoveAllStmt* _copyAlterTableMoveAllStmt ( const AlterTableMoveAllStmt from)
static

Definition at line 3941 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3942 {
3944 
3945  COPY_STRING_FIELD(orig_tablespacename);
3946  COPY_SCALAR_FIELD(objtype);
3947  COPY_NODE_FIELD(roles);
3948  COPY_STRING_FIELD(new_tablespacename);
3949  COPY_SCALAR_FIELD(nowait);
3950 
3951  return newnode;
3952 }
#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:558
static AlterTableSpaceOptionsStmt* _copyAlterTableSpaceOptionsStmt ( const AlterTableSpaceOptionsStmt from)
static

Definition at line 3929 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3930 {
3932 
3933  COPY_STRING_FIELD(tablespacename);
3935  COPY_SCALAR_FIELD(isReset);
3936 
3937  return newnode;
3938 }
#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:558
static AlterTableStmt* _copyAlterTableStmt ( const AlterTableStmt from)
static

Definition at line 3070 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3071 {
3073 
3074  COPY_NODE_FIELD(relation);
3075  COPY_NODE_FIELD(cmds);
3076  COPY_SCALAR_FIELD(relkind);
3077  COPY_SCALAR_FIELD(missing_ok);
3078 
3079  return newnode;
3080 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlterTSConfigurationStmt* _copyAlterTSConfigurationStmt ( const AlterTSConfigurationStmt from)
static

Definition at line 4386 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4387 {
4389 
4390  COPY_SCALAR_FIELD(kind);
4391  COPY_NODE_FIELD(cfgname);
4392  COPY_NODE_FIELD(tokentype);
4393  COPY_NODE_FIELD(dicts);
4394  COPY_SCALAR_FIELD(override);
4395  COPY_SCALAR_FIELD(replace);
4396  COPY_SCALAR_FIELD(missing_ok);
4397 
4398  return newnode;
4399 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlterTSDictionaryStmt* _copyAlterTSDictionaryStmt ( const AlterTSDictionaryStmt from)
static

Definition at line 4375 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

4376 {
4378 
4379  COPY_NODE_FIELD(dictname);
4381 
4382  return newnode;
4383 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static AlterUserMappingStmt* _copyAlterUserMappingStmt ( const AlterUserMappingStmt from)
static

Definition at line 4056 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, makeNode, and user.

Referenced by copyObjectImpl().

4057 {
4059 
4061  COPY_STRING_FIELD(servername);
4063 
4064  return newnode;
4065 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static char * user
Definition: pg_regress.c:93
static Append* _copyAppend ( const Append from)
static

Definition at line 231 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 2238 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2239 {
2240  AppendRelInfo *newnode = makeNode(AppendRelInfo);
2241 
2242  COPY_SCALAR_FIELD(parent_relid);
2243  COPY_SCALAR_FIELD(child_relid);
2244  COPY_SCALAR_FIELD(parent_reltype);
2245  COPY_SCALAR_FIELD(child_reltype);
2246  COPY_NODE_FIELD(translated_vars);
2247  COPY_SCALAR_FIELD(parent_reloid);
2248 
2249  return newnode;
2250 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static ArrayCoerceExpr* _copyArrayCoerceExpr ( const ArrayCoerceExpr from)
static

Definition at line 1696 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1697 {
1699 
1701  COPY_NODE_FIELD(elemexpr);
1702  COPY_SCALAR_FIELD(resulttype);
1703  COPY_SCALAR_FIELD(resulttypmod);
1704  COPY_SCALAR_FIELD(resultcollid);
1705  COPY_SCALAR_FIELD(coerceformat);
1706  COPY_LOCATION_FIELD(location);
1707 
1708  return newnode;
1709 }
#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:558
void * arg
static ArrayExpr* _copyArrayExpr ( const ArrayExpr from)
static

Definition at line 1794 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

1795 {
1796  ArrayExpr *newnode = makeNode(ArrayExpr);
1797 
1798  COPY_SCALAR_FIELD(array_typeid);
1799  COPY_SCALAR_FIELD(array_collid);
1800  COPY_SCALAR_FIELD(element_typeid);
1801  COPY_NODE_FIELD(elements);
1802  COPY_SCALAR_FIELD(multidims);
1803  COPY_LOCATION_FIELD(location);
1804 
1805  return newnode;
1806 }
#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:558
static ArrayRef* _copyArrayRef ( const ArrayRef from)
static

Definition at line 1419 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

1420 {
1421  ArrayRef *newnode = makeNode(ArrayRef);
1422 
1423  COPY_SCALAR_FIELD(refarraytype);
1424  COPY_SCALAR_FIELD(refelemtype);
1425  COPY_SCALAR_FIELD(reftypmod);
1426  COPY_SCALAR_FIELD(refcollid);
1427  COPY_NODE_FIELD(refupperindexpr);
1428  COPY_NODE_FIELD(reflowerindexpr);
1429  COPY_NODE_FIELD(refexpr);
1430  COPY_NODE_FIELD(refassgnexpr);
1431 
1432  return newnode;
1433 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static A_Star* _copyAStar ( const A_Star from)
static

Definition at line 2573 of file copyfuncs.c.

References makeNode.

Referenced by copyObjectImpl().

2574 {
2575  A_Star *newnode = makeNode(A_Star);
2576 
2577  return newnode;
2578 }
#define makeNode(_type_)
Definition: nodes.h:558
static BitmapAnd* _copyBitmapAnd ( const BitmapAnd from)
static

Definition at line 308 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 545 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObjectImpl().

546 {
548 
549  /*
550  * copy node superclass fields
551  */
552  CopyScanFields((const Scan *) from, (Scan *) newnode);
553 
554  /*
555  * copy remainder of node
556  */
557  COPY_NODE_FIELD(bitmapqualorig);
558 
559  return newnode;
560 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:405
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static BitmapIndexScan* _copyBitmapIndexScan ( const BitmapIndexScan from)
static

Definition at line 521 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 329 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

330 {
331  BitmapOr *newnode = makeNode(BitmapOr);
332 
333  /*
334  * copy node superclass fields
335  */
336  CopyPlanFields((const Plan *) from, (Plan *) newnode);
337 
338  /*
339  * copy remainder of node
340  */
341  COPY_SCALAR_FIELD(isshared);
342  COPY_NODE_FIELD(bitmapplans);
343 
344  return newnode;
345 }
#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:115
#define makeNode(_type_)
Definition: nodes.h:558
static BooleanTest* _copyBooleanTest ( const BooleanTest from)
static

Definition at line 1934 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1935 {
1936  BooleanTest *newnode = makeNode(BooleanTest);
1937 
1939  COPY_SCALAR_FIELD(booltesttype);
1940  COPY_LOCATION_FIELD(location);
1941 
1942  return newnode;
1943 }
#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:558
void * arg
static BoolExpr* _copyBoolExpr ( const BoolExpr from)
static

Definition at line 1554 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1555 {
1556  BoolExpr *newnode = makeNode(BoolExpr);
1557 
1560  COPY_LOCATION_FIELD(location);
1561 
1562  return newnode;
1563 }
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:558
static CaseExpr* _copyCaseExpr ( const CaseExpr from)
static

Definition at line 1746 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1747 {
1748  CaseExpr *newnode = makeNode(CaseExpr);
1749 
1750  COPY_SCALAR_FIELD(casetype);
1751  COPY_SCALAR_FIELD(casecollid);
1754  COPY_NODE_FIELD(defresult);
1755  COPY_LOCATION_FIELD(location);
1756 
1757  return newnode;
1758 }
#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:558
void * arg
static CaseTestExpr* _copyCaseTestExpr ( const CaseTestExpr from)
static

Definition at line 1779 of file copyfuncs.c.

References COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

1780 {
1781  CaseTestExpr *newnode = makeNode(CaseTestExpr);
1782 
1783  COPY_SCALAR_FIELD(typeId);
1784  COPY_SCALAR_FIELD(typeMod);
1785  COPY_SCALAR_FIELD(collation);
1786 
1787  return newnode;
1788 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define makeNode(_type_)
Definition: nodes.h:558
static CaseWhen* _copyCaseWhen ( const CaseWhen from)
static

Definition at line 1764 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

1765 {
1766  CaseWhen *newnode = makeNode(CaseWhen);
1767 
1768  COPY_NODE_FIELD(expr);
1769  COPY_NODE_FIELD(result);
1770  COPY_LOCATION_FIELD(location);
1771 
1772  return newnode;
1773 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:558
static ClosePortalStmt* _copyClosePortalStmt ( const ClosePortalStmt from)
static

Definition at line 3202 of file copyfuncs.c.

References COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3203 {
3205 
3206  COPY_STRING_FIELD(portalname);
3207 
3208  return newnode;
3209 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static ClusterStmt* _copyClusterStmt ( const ClusterStmt from)
static

Definition at line 3212 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3213 {
3214  ClusterStmt *newnode = makeNode(ClusterStmt);
3215 
3216  COPY_NODE_FIELD(relation);
3217  COPY_STRING_FIELD(indexname);
3219 
3220  return newnode;
3221 }
#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:85
#define makeNode(_type_)
Definition: nodes.h:558
static CoalesceExpr* _copyCoalesceExpr ( const CoalesceExpr from)
static

Definition at line 1847 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1848 {
1849  CoalesceExpr *newnode = makeNode(CoalesceExpr);
1850 
1851  COPY_SCALAR_FIELD(coalescetype);
1852  COPY_SCALAR_FIELD(coalescecollid);
1854  COPY_LOCATION_FIELD(location);
1855 
1856  return newnode;
1857 }
#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:558
static CoerceToDomain* _copyCoerceToDomain ( const CoerceToDomain from)
static

Definition at line 1949 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1950 {
1952 
1954  COPY_SCALAR_FIELD(resulttype);
1955  COPY_SCALAR_FIELD(resulttypmod);
1956  COPY_SCALAR_FIELD(resultcollid);
1957  COPY_SCALAR_FIELD(coercionformat);
1958  COPY_LOCATION_FIELD(location);
1959 
1960  return newnode;
1961 }
#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:558
void * arg
static CoerceToDomainValue* _copyCoerceToDomainValue ( const CoerceToDomainValue from)
static

Definition at line 1967 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

1968 {
1970 
1971  COPY_SCALAR_FIELD(typeId);
1972  COPY_SCALAR_FIELD(typeMod);
1973  COPY_SCALAR_FIELD(collation);
1974  COPY_LOCATION_FIELD(location);
1975 
1976  return newnode;
1977 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:558
static CoerceViaIO* _copyCoerceViaIO ( const CoerceViaIO from)
static

Definition at line 1679 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1680 {
1681  CoerceViaIO *newnode = makeNode(CoerceViaIO);
1682 
1684  COPY_SCALAR_FIELD(resulttype);
1685  COPY_SCALAR_FIELD(resultcollid);
1686  COPY_SCALAR_FIELD(coerceformat);
1687  COPY_LOCATION_FIELD(location);
1688 
1689  return newnode;
1690 }
#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:558
void * arg
static CollateClause* _copyCollateClause ( const CollateClause from)
static

Definition at line 2773 of file copyfuncs.c.

References arg, COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2774 {
2775  CollateClause *newnode = makeNode(CollateClause);
2776 
2778  COPY_NODE_FIELD(collname);
2779  COPY_LOCATION_FIELD(location);
2780 
2781  return newnode;
2782 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:558
void * arg
static CollateExpr* _copyCollateExpr ( const CollateExpr from)
static

Definition at line 1731 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1732 {
1733  CollateExpr *newnode = makeNode(CollateExpr);
1734 
1736  COPY_SCALAR_FIELD(collOid);
1737  COPY_LOCATION_FIELD(location);
1738 
1739  return newnode;
1740 }
#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:558
void * arg
static ColumnDef* _copyColumnDef ( const ColumnDef from)
static

Definition at line 2801 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2802 {
2803  ColumnDef *newnode = makeNode(ColumnDef);
2804 
2805  COPY_STRING_FIELD(colname);
2806  COPY_NODE_FIELD(typeName);
2807  COPY_SCALAR_FIELD(inhcount);
2808  COPY_SCALAR_FIELD(is_local);
2809  COPY_SCALAR_FIELD(is_not_null);
2810  COPY_SCALAR_FIELD(is_from_type);
2811  COPY_SCALAR_FIELD(is_from_parent);
2812  COPY_SCALAR_FIELD(storage);
2813  COPY_NODE_FIELD(raw_default);
2814  COPY_NODE_FIELD(cooked_default);
2815  COPY_SCALAR_FIELD(identity);
2816  COPY_NODE_FIELD(collClause);
2817  COPY_SCALAR_FIELD(collOid);
2818  COPY_NODE_FIELD(constraints);
2819  COPY_NODE_FIELD(fdwoptions);
2820  COPY_LOCATION_FIELD(location);
2821 
2822  return newnode;
2823 }
#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:558
static ColumnRef* _copyColumnRef ( const ColumnRef from)
static

Definition at line 2501 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2502 {
2503  ColumnRef *newnode = makeNode(ColumnRef);
2504 
2505  COPY_NODE_FIELD(fields);
2506  COPY_LOCATION_FIELD(location);
2507 
2508  return newnode;
2509 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:558
static CommentStmt* _copyCommentStmt ( const CommentStmt from)
static

Definition at line 3324 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3325 {
3326  CommentStmt *newnode = makeNode(CommentStmt);
3327 
3328  COPY_SCALAR_FIELD(objtype);
3329  COPY_NODE_FIELD(object);
3330  COPY_STRING_FIELD(comment);
3331 
3332  return newnode;
3333 }
#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:558
static CommonTableExpr* _copyCommonTableExpr ( const CommonTableExpr from)
static

Definition at line 2468 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2469 {
2471 
2472  COPY_STRING_FIELD(ctename);
2473  COPY_NODE_FIELD(aliascolnames);
2474  COPY_NODE_FIELD(ctequery);
2475  COPY_LOCATION_FIELD(location);
2476  COPY_SCALAR_FIELD(cterecursive);
2477  COPY_SCALAR_FIELD(cterefcount);
2478  COPY_NODE_FIELD(ctecolnames);
2479  COPY_NODE_FIELD(ctecoltypes);
2480  COPY_NODE_FIELD(ctecoltypmods);
2481  COPY_NODE_FIELD(ctecolcollations);
2482 
2483  return newnode;
2484 }
#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:558
static CompositeTypeStmt* _copyCompositeTypeStmt ( const CompositeTypeStmt from)
static

Definition at line 3580 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3581 {
3583 
3584  COPY_NODE_FIELD(typevar);
3585  COPY_NODE_FIELD(coldeflist);
3586 
3587  return newnode;
3588 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static Const* _copyConst ( const Const from)
static

Definition at line 1295 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1296 {
1297  Const *newnode = makeNode(Const);
1298 
1299  COPY_SCALAR_FIELD(consttype);
1300  COPY_SCALAR_FIELD(consttypmod);
1301  COPY_SCALAR_FIELD(constcollid);
1302  COPY_SCALAR_FIELD(constlen);
1303 
1304  if (from->constbyval || from->constisnull)
1305  {
1306  /*
1307  * passed by value so just copy the datum. Also, don't try to copy
1308  * struct when value is null!
1309  */
1310  newnode->constvalue = from->constvalue;
1311  }
1312  else
1313  {
1314  /*
1315  * passed by reference. We need a palloc'd copy.
1316  */
1317  newnode->constvalue = datumCopy(from->constvalue,
1318  from->constbyval,
1319  from->constlen);
1320  }
1321 
1322  COPY_SCALAR_FIELD(constisnull);
1323  COPY_SCALAR_FIELD(constbyval);
1324  COPY_LOCATION_FIELD(location);
1325 
1326  return newnode;
1327 }
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:558
bool constisnull
Definition: primnodes.h:197
static Constraint* _copyConstraint ( const Constraint from)
static

Definition at line 2826 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2827 {
2828  Constraint *newnode = makeNode(Constraint);
2829 
2830  COPY_SCALAR_FIELD(contype);
2831  COPY_STRING_FIELD(conname);
2832  COPY_SCALAR_FIELD(deferrable);
2833  COPY_SCALAR_FIELD(initdeferred);
2834  COPY_LOCATION_FIELD(location);
2835  COPY_SCALAR_FIELD(is_no_inherit);
2836  COPY_NODE_FIELD(raw_expr);
2837  COPY_STRING_FIELD(cooked_expr);
2838  COPY_SCALAR_FIELD(generated_when);
2839  COPY_NODE_FIELD(keys);
2840  COPY_NODE_FIELD(exclusions);
2842  COPY_STRING_FIELD(indexname);
2843  COPY_STRING_FIELD(indexspace);
2844  COPY_STRING_FIELD(access_method);
2845  COPY_NODE_FIELD(where_clause);
2846  COPY_NODE_FIELD(pktable);
2847  COPY_NODE_FIELD(fk_attrs);
2848  COPY_NODE_FIELD(pk_attrs);
2849  COPY_SCALAR_FIELD(fk_matchtype);
2850  COPY_SCALAR_FIELD(fk_upd_action);
2851  COPY_SCALAR_FIELD(fk_del_action);
2852  COPY_NODE_FIELD(old_conpfeqop);
2853  COPY_SCALAR_FIELD(old_pktable_oid);
2854  COPY_SCALAR_FIELD(skip_validation);
2855  COPY_SCALAR_FIELD(initially_valid);
2856 
2857  return newnode;
2858 }
#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:558
static ConstraintsSetStmt* _copyConstraintsSetStmt ( const ConstraintsSetStmt from)
static

Definition at line 4255 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4256 {
4258 
4259  COPY_NODE_FIELD(constraints);
4260  COPY_SCALAR_FIELD(deferred);
4261 
4262  return newnode;
4263 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static ConvertRowtypeExpr* _copyConvertRowtypeExpr ( const ConvertRowtypeExpr from)
static

Definition at line 1715 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1716 {
1718 
1720  COPY_SCALAR_FIELD(resulttype);
1721  COPY_SCALAR_FIELD(convertformat);
1722  COPY_LOCATION_FIELD(location);
1723 
1724  return newnode;
1725 }
#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:558
void * arg
static CopyStmt* _copyCopyStmt ( const CopyStmt from)
static

Definition at line 3224 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3225 {
3226  CopyStmt *newnode = makeNode(CopyStmt);
3227 
3228  COPY_NODE_FIELD(relation);
3229  COPY_NODE_FIELD(query);
3230  COPY_NODE_FIELD(attlist);
3231  COPY_SCALAR_FIELD(is_from);
3232  COPY_SCALAR_FIELD(is_program);
3235 
3236  return newnode;
3237 }
#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:558
static char * filename
Definition: pg_dumpall.c:90
static CreateAmStmt* _copyCreateAmStmt ( const CreateAmStmt from)
static

Definition at line 4122 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4123 {
4124  CreateAmStmt *newnode = makeNode(CreateAmStmt);
4125 
4126  COPY_STRING_FIELD(amname);
4127  COPY_NODE_FIELD(handler_name);
4128  COPY_SCALAR_FIELD(amtype);
4129 
4130  return newnode;
4131 }
#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:558
static CreateCastStmt* _copyCreateCastStmt ( const CreateCastStmt from)
static

Definition at line 4306 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4307 {
4309 
4310  COPY_NODE_FIELD(sourcetype);
4311  COPY_NODE_FIELD(targettype);
4312  COPY_NODE_FIELD(func);
4313  COPY_SCALAR_FIELD(context);
4314  COPY_SCALAR_FIELD(inout);
4315 
4316  return newnode;
4317 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static CreateConversionStmt* _copyCreateConversionStmt ( const CreateConversionStmt from)
static

Definition at line 4292 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4293 {
4295 
4296  COPY_NODE_FIELD(conversion_name);
4297  COPY_STRING_FIELD(for_encoding_name);
4298  COPY_STRING_FIELD(to_encoding_name);
4299  COPY_NODE_FIELD(func_name);
4300  COPY_SCALAR_FIELD(def);
4301 
4302  return newnode;
4303 }
#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:558
static CreatedbStmt* _copyCreatedbStmt ( const CreatedbStmt from)
static

Definition at line 3720 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObjectImpl().

3721 {
3722  CreatedbStmt *newnode = makeNode(CreatedbStmt);
3723 
3726 
3727  return newnode;
3728 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
char * dbname
Definition: streamutil.c:42
static CreateDomainStmt* _copyCreateDomainStmt ( const CreateDomainStmt from)
static

Definition at line 3653 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3654 {
3656 
3657  COPY_NODE_FIELD(domainname);
3658  COPY_NODE_FIELD(typeName);
3659  COPY_NODE_FIELD(collClause);
3660  COPY_NODE_FIELD(constraints);
3661 
3662  return newnode;
3663 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static CreateEnumStmt* _copyCreateEnumStmt ( const CreateEnumStmt from)
static

Definition at line 3591 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3592 {
3594 
3595  COPY_NODE_FIELD(typeName);
3596  COPY_NODE_FIELD(vals);
3597 
3598  return newnode;
3599 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static CreateEventTrigStmt* _copyCreateEventTrigStmt ( const CreateEventTrigStmt from)
static

Definition at line 4157 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4158 {
4160 
4161  COPY_STRING_FIELD(trigname);
4162  COPY_STRING_FIELD(eventname);
4163  COPY_NODE_FIELD(whenclause);
4164  COPY_NODE_FIELD(funcname);
4165 
4166  return newnode;
4167 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static CreateExtensionStmt* _copyCreateExtensionStmt ( const CreateExtensionStmt from)
static

Definition at line 3955 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3956 {
3958 
3959  COPY_STRING_FIELD(extname);
3960  COPY_SCALAR_FIELD(if_not_exists);
3962 
3963  return newnode;
3964 }
#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:558
static CreateFdwStmt* _copyCreateFdwStmt ( const CreateFdwStmt from)
static

Definition at line 3991 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3992 {
3993  CreateFdwStmt *newnode = makeNode(CreateFdwStmt);
3994 
3995  COPY_STRING_FIELD(fdwname);
3996  COPY_NODE_FIELD(func_options);
3998 
3999  return newnode;
4000 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static CreateForeignServerStmt* _copyCreateForeignServerStmt ( const CreateForeignServerStmt from)
static

Definition at line 4015 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4016 {
4018 
4019  COPY_STRING_FIELD(servername);
4020  COPY_STRING_FIELD(servertype);
4021  COPY_STRING_FIELD(version);
4022  COPY_STRING_FIELD(fdwname);
4023  COPY_SCALAR_FIELD(if_not_exists);
4025 
4026  return newnode;
4027 }
#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:558
static CreateForeignTableStmt* _copyCreateForeignTableStmt ( const CreateForeignTableStmt from)
static

Definition at line 4080 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4081 {
4083 
4084  CopyCreateStmtFields((const CreateStmt *) from, (CreateStmt *) newnode);
4085 
4086  COPY_STRING_FIELD(servername);
4088 
4089  return newnode;
4090 }
static void CopyCreateStmtFields(const CreateStmt *from, CreateStmt *newnode)
Definition: copyfuncs.c:3246
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static CreateFunctionStmt* _copyCreateFunctionStmt ( const CreateFunctionStmt from)
static

Definition at line 3404 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3405 {
3407 
3408  COPY_SCALAR_FIELD(replace);
3409  COPY_NODE_FIELD(funcname);
3410  COPY_NODE_FIELD(parameters);
3411  COPY_NODE_FIELD(returnType);
3413  COPY_NODE_FIELD(withClause);
3414 
3415  return newnode;
3416 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static CreateOpClassItem* _copyCreateOpClassItem ( const CreateOpClassItem from)
static

Definition at line 3681 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, makeNode, and name.

Referenced by copyObjectImpl().

3682 {
3684 
3685  COPY_SCALAR_FIELD(itemtype);
3687  COPY_SCALAR_FIELD(number);
3688  COPY_NODE_FIELD(order_family);
3689  COPY_NODE_FIELD(class_args);
3690  COPY_NODE_FIELD(storedtype);
3691 
3692  return newnode;
3693 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
const char * name
Definition: encode.c:521
static CreateOpClassStmt* _copyCreateOpClassStmt ( const CreateOpClassStmt from)
static

Definition at line 3666 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3667 {
3669 
3670  COPY_NODE_FIELD(opclassname);
3671  COPY_NODE_FIELD(opfamilyname);
3672  COPY_STRING_FIELD(amname);
3673  COPY_NODE_FIELD(datatype);
3674  COPY_NODE_FIELD(items);
3675  COPY_SCALAR_FIELD(isDefault);
3676 
3677  return newnode;
3678 }
#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:558
static CreateOpFamilyStmt* _copyCreateOpFamilyStmt ( const CreateOpFamilyStmt from)
static

Definition at line 3696 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3697 {
3699 
3700  COPY_NODE_FIELD(opfamilyname);
3701  COPY_STRING_FIELD(amname);
3702 
3703  return newnode;
3704 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static CreatePLangStmt* _copyCreatePLangStmt ( const CreatePLangStmt from)
static

Definition at line 4181 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4182 {
4184 
4185  COPY_SCALAR_FIELD(replace);
4186  COPY_STRING_FIELD(plname);
4187  COPY_NODE_FIELD(plhandler);
4188  COPY_NODE_FIELD(plinline);
4189  COPY_NODE_FIELD(plvalidator);
4190  COPY_SCALAR_FIELD(pltrusted);
4191 
4192  return newnode;
4193 }
#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:558
static CreatePolicyStmt* _copyCreatePolicyStmt ( const CreatePolicyStmt from)
static

Definition at line 4402 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4403 {
4405 
4406  COPY_STRING_FIELD(policy_name);
4407  COPY_NODE_FIELD(table);
4408  COPY_STRING_FIELD(cmd_name);
4409  COPY_SCALAR_FIELD(permissive);
4410  COPY_NODE_FIELD(roles);
4411  COPY_NODE_FIELD(qual);
4412  COPY_NODE_FIELD(with_check);
4413 
4414  return newnode;
4415 }
#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:558
static CreatePublicationStmt* _copyCreatePublicationStmt ( const CreatePublicationStmt from)
static

Definition at line 4496 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4497 {
4499 
4500  COPY_STRING_FIELD(pubname);
4502  COPY_NODE_FIELD(tables);
4503  COPY_SCALAR_FIELD(for_all_tables);
4504 
4505  return newnode;
4506 }
#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:558
static CreateRangeStmt* _copyCreateRangeStmt ( const CreateRangeStmt from)
static

Definition at line 3602 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3603 {
3605 
3606  COPY_NODE_FIELD(typeName);
3607  COPY_NODE_FIELD(params);
3608 
3609  return newnode;
3610 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static CreateRoleStmt* _copyCreateRoleStmt ( const CreateRoleStmt from)
static

Definition at line 4196 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4197 {
4199 
4200  COPY_SCALAR_FIELD(stmt_type);
4201  COPY_STRING_FIELD(role);
4203 
4204  return newnode;
4205 }
#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:558
static CreateSchemaStmt* _copyCreateSchemaStmt ( const CreateSchemaStmt from)
static

Definition at line 4279 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4280 {
4282 
4283  COPY_STRING_FIELD(schemaname);
4284  COPY_NODE_FIELD(authrole);
4285  COPY_NODE_FIELD(schemaElts);
4286  COPY_SCALAR_FIELD(if_not_exists);
4287 
4288  return newnode;
4289 }
#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:558
static CreateSeqStmt* _copyCreateSeqStmt ( const CreateSeqStmt from)
static

Definition at line 3845 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3846 {
3847  CreateSeqStmt *newnode = makeNode(CreateSeqStmt);
3848 
3849  COPY_NODE_FIELD(sequence);
3851  COPY_SCALAR_FIELD(ownerId);
3852  COPY_SCALAR_FIELD(for_identity);
3853  COPY_SCALAR_FIELD(if_not_exists);
3854 
3855  return newnode;
3856 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static CreateStatsStmt* _copyCreateStatsStmt ( const CreateStatsStmt from)
static

Definition at line 3390 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3391 {
3393 
3394  COPY_NODE_FIELD(defnames);
3395  COPY_NODE_FIELD(stat_types);
3396  COPY_NODE_FIELD(exprs);
3397  COPY_NODE_FIELD(relations);
3398  COPY_SCALAR_FIELD(if_not_exists);
3399 
3400  return newnode;
3401 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static CreateStmt* _copyCreateStmt ( const CreateStmt from)
static

Definition at line 3262 of file copyfuncs.c.

References CopyCreateStmtFields(), and makeNode.

Referenced by copyObjectImpl().

3263 {
3264  CreateStmt *newnode = makeNode(CreateStmt);
3265 
3266  CopyCreateStmtFields(from, newnode);
3267 
3268  return newnode;
3269 }
static void CopyCreateStmtFields(const CreateStmt *from, CreateStmt *newnode)
Definition: copyfuncs.c:3246
#define makeNode(_type_)
Definition: nodes.h:558
static CreateSubscriptionStmt* _copyCreateSubscriptionStmt ( const CreateSubscriptionStmt from)
static

Definition at line 4523 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4524 {
4526 
4527  COPY_STRING_FIELD(subname);
4528  COPY_STRING_FIELD(conninfo);
4529  COPY_NODE_FIELD(publication);
4531 
4532  return newnode;
4533 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static CreateTableAsStmt* _copyCreateTableAsStmt ( const CreateTableAsStmt from)
static

Definition at line 3798 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3799 {
3801 
3802  COPY_NODE_FIELD(query);
3803  COPY_NODE_FIELD(into);
3804  COPY_SCALAR_FIELD(relkind);
3805  COPY_SCALAR_FIELD(is_select_into);
3806  COPY_SCALAR_FIELD(if_not_exists);
3807 
3808  return newnode;
3809 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static CreateTableSpaceStmt* _copyCreateTableSpaceStmt ( const CreateTableSpaceStmt from)
static

Definition at line 3905 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3906 {
3908 
3909  COPY_STRING_FIELD(tablespacename);
3910  COPY_NODE_FIELD(owner);
3911  COPY_STRING_FIELD(location);
3913 
3914  return newnode;
3915 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static CreateTransformStmt* _copyCreateTransformStmt ( const CreateTransformStmt from)
static

Definition at line 4108 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4109 {
4111 
4112  COPY_SCALAR_FIELD(replace);
4113  COPY_NODE_FIELD(type_name);
4114  COPY_STRING_FIELD(lang);
4115  COPY_NODE_FIELD(fromsql);
4116  COPY_NODE_FIELD(tosql);
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:558
static CreateTrigStmt* _copyCreateTrigStmt ( const CreateTrigStmt from)
static

Definition at line 4134 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4135 {
4137 
4138  COPY_STRING_FIELD(trigname);
4139  COPY_NODE_FIELD(relation);
4140  COPY_NODE_FIELD(funcname);
4142  COPY_SCALAR_FIELD(row);
4143  COPY_SCALAR_FIELD(timing);
4144  COPY_SCALAR_FIELD(events);
4145  COPY_NODE_FIELD(columns);
4146  COPY_NODE_FIELD(whenClause);
4147  COPY_SCALAR_FIELD(isconstraint);
4148  COPY_NODE_FIELD(transitionRels);
4149  COPY_SCALAR_FIELD(deferrable);
4150  COPY_SCALAR_FIELD(initdeferred);
4151  COPY_NODE_FIELD(constrrel);
4152 
4153  return newnode;
4154 }
#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:558
static CreateUserMappingStmt* _copyCreateUserMappingStmt ( const CreateUserMappingStmt from)
static

Definition at line 4043 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4044 {
4046 
4048  COPY_STRING_FIELD(servername);
4049  COPY_SCALAR_FIELD(if_not_exists);
4051 
4052  return newnode;
4053 }
#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:558
static char * user
Definition: pg_regress.c:93
static CteScan* _copyCteScan ( const CteScan from)
static

Definition at line 672 of file copyfuncs.c.

References COPY_SCALAR_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObjectImpl().

673 {
674  CteScan *newnode = makeNode(CteScan);
675 
676  /*
677  * copy node superclass fields
678  */
679  CopyScanFields((const Scan *) from, (Scan *) newnode);
680 
681  /*
682  * copy remainder of node
683  */
684  COPY_SCALAR_FIELD(ctePlanId);
685  COPY_SCALAR_FIELD(cteParam);
686 
687  return newnode;
688 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:405
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define makeNode(_type_)
Definition: nodes.h:558
static CurrentOfExpr* _copyCurrentOfExpr ( const CurrentOfExpr from)
static

Definition at line 1999 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

2000 {
2001  CurrentOfExpr *newnode = makeNode(CurrentOfExpr);
2002 
2003  COPY_SCALAR_FIELD(cvarno);
2004  COPY_STRING_FIELD(cursor_name);
2005  COPY_SCALAR_FIELD(cursor_param);
2006 
2007  return newnode;
2008 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static CustomScan* _copyCustomScan ( const CustomScan from)
static

Definition at line 764 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

765 {
766  CustomScan *newnode = makeNode(CustomScan);
767 
768  /*
769  * copy node superclass fields
770  */
771  CopyScanFields((const Scan *) from, (Scan *) newnode);
772 
773  /*
774  * copy remainder of node
775  */
776  COPY_SCALAR_FIELD(flags);
777  COPY_NODE_FIELD(custom_plans);
778  COPY_NODE_FIELD(custom_exprs);
779  COPY_NODE_FIELD(custom_private);
780  COPY_NODE_FIELD(custom_scan_tlist);
781  COPY_BITMAPSET_FIELD(custom_relids);
782 
783  /*
784  * NOTE: The method field of CustomScan is required to be a pointer to a
785  * static table of callback functions. So we don't copy the table itself,
786  * just reference the original one.
787  */
788  COPY_SCALAR_FIELD(methods);
789 
790  return newnode;
791 }
#define COPY_BITMAPSET_FIELD(fldname)
Definition: copyfuncs.c:49
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:405
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static DeallocateStmt* _copyDeallocateStmt ( const DeallocateStmt from)
static

Definition at line 4343 of file copyfuncs.c.

References COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObjectImpl().

4344 {
4346 
4348 
4349  return newnode;
4350 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
const char * name
Definition: encode.c:521
static DeclareCursorStmt* _copyDeclareCursorStmt ( const DeclareCursorStmt from)
static

Definition at line 3190 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3191 {
3193 
3194  COPY_STRING_FIELD(portalname);
3196  COPY_NODE_FIELD(query);
3197 
3198  return newnode;
3199 }
#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:558
static DefElem* _copyDefElem ( const DefElem from)
static

Definition at line 2861 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2862 {
2863  DefElem *newnode = makeNode(DefElem);
2864 
2865  COPY_STRING_FIELD(defnamespace);
2866  COPY_STRING_FIELD(defname);
2868  COPY_SCALAR_FIELD(defaction);
2869  COPY_LOCATION_FIELD(location);
2870 
2871  return newnode;
2872 }
#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:558
void * arg
static DefineStmt* _copyDefineStmt ( const DefineStmt from)
static

Definition at line 3283 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3284 {
3285  DefineStmt *newnode = makeNode(DefineStmt);
3286 
3287  COPY_SCALAR_FIELD(kind);
3288  COPY_SCALAR_FIELD(oldstyle);
3289  COPY_NODE_FIELD(defnames);
3291  COPY_NODE_FIELD(definition);
3292  COPY_SCALAR_FIELD(if_not_exists);
3293 
3294  return newnode;
3295 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static DeleteStmt* _copyDeleteStmt ( const DeleteStmt from)
static

Definition at line 2997 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2998 {
2999  DeleteStmt *newnode = makeNode(DeleteStmt);
3000 
3001  COPY_NODE_FIELD(relation);
3002  COPY_NODE_FIELD(usingClause);
3003  COPY_NODE_FIELD(whereClause);
3004  COPY_NODE_FIELD(returningList);
3005  COPY_NODE_FIELD(withClause);
3006 
3007  return newnode;
3008 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static DiscardStmt* _copyDiscardStmt ( const DiscardStmt from)
static

Definition at line 3895 of file copyfuncs.c.

References COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3896 {
3897  DiscardStmt *newnode = makeNode(DiscardStmt);
3898 
3899  COPY_SCALAR_FIELD(target);
3900 
3901  return newnode;
3902 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define makeNode(_type_)
Definition: nodes.h:558
static DistinctExpr* _copyDistinctExpr ( const DistinctExpr from)
static

Definition at line 1496 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1497 {
1498  DistinctExpr *newnode = makeNode(DistinctExpr);
1499 
1500  COPY_SCALAR_FIELD(opno);
1501  COPY_SCALAR_FIELD(opfuncid);
1502  COPY_SCALAR_FIELD(opresulttype);
1503  COPY_SCALAR_FIELD(opretset);
1504  COPY_SCALAR_FIELD(opcollid);
1505  COPY_SCALAR_FIELD(inputcollid);
1507  COPY_LOCATION_FIELD(location);
1508 
1509  return newnode;
1510 }
#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:558
static DoStmt* _copyDoStmt ( const DoStmt from)
static

Definition at line 3443 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3444 {
3445  DoStmt *newnode = makeNode(DoStmt);
3446 
3448 
3449  return newnode;
3450 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static DropdbStmt* _copyDropdbStmt ( const DropdbStmt from)
static

Definition at line 3753 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObjectImpl().

3754 {
3755  DropdbStmt *newnode = makeNode(DropdbStmt);
3756 
3758  COPY_SCALAR_FIELD(missing_ok);
3759 
3760  return newnode;
3761 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
char * dbname
Definition: streamutil.c:42
static DropOwnedStmt* _copyDropOwnedStmt ( const DropOwnedStmt from)
static

Definition at line 4353 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4354 {
4355  DropOwnedStmt *newnode = makeNode(DropOwnedStmt);
4356 
4357  COPY_NODE_FIELD(roles);
4358  COPY_SCALAR_FIELD(behavior);
4359 
4360  return newnode;
4361 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static DropRoleStmt* _copyDropRoleStmt ( const DropRoleStmt from)
static

Definition at line 4232 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4233 {
4234  DropRoleStmt *newnode = makeNode(DropRoleStmt);
4235 
4236  COPY_NODE_FIELD(roles);
4237  COPY_SCALAR_FIELD(missing_ok);
4238 
4239  return newnode;
4240 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static DropStmt* _copyDropStmt ( const DropStmt from)
static

Definition at line 3298 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3299 {
3300  DropStmt *newnode = makeNode(DropStmt);
3301 
3302  COPY_NODE_FIELD(objects);
3303  COPY_SCALAR_FIELD(removeType);
3304  COPY_SCALAR_FIELD(behavior);
3305  COPY_SCALAR_FIELD(missing_ok);
3306  COPY_SCALAR_FIELD(concurrent);
3307 
3308  return newnode;
3309 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static DropSubscriptionStmt* _copyDropSubscriptionStmt ( const DropSubscriptionStmt from)
static

Definition at line 4550 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4551 {
4553 
4554  COPY_STRING_FIELD(subname);
4555  COPY_SCALAR_FIELD(missing_ok);
4556  COPY_SCALAR_FIELD(behavior);
4557 
4558  return newnode;
4559 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static DropTableSpaceStmt* _copyDropTableSpaceStmt ( const DropTableSpaceStmt from)
static

Definition at line 3918 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3919 {
3921 
3922  COPY_STRING_FIELD(tablespacename);
3923  COPY_SCALAR_FIELD(missing_ok);
3924 
3925  return newnode;
3926 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static DropUserMappingStmt* _copyDropUserMappingStmt ( const DropUserMappingStmt from)
static

Definition at line 4068 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4069 {
4071 
4073  COPY_STRING_FIELD(servername);
4074  COPY_SCALAR_FIELD(missing_ok);
4075 
4076  return newnode;
4077 }
#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:558
static char * user
Definition: pg_regress.c:93
static ExecuteStmt* _copyExecuteStmt ( const ExecuteStmt from)
static

Definition at line 4332 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObjectImpl().

4333 {
4334  ExecuteStmt *newnode = makeNode(ExecuteStmt);
4335 
4337  COPY_NODE_FIELD(params);
4338 
4339  return newnode;
4340 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
const char * name
Definition: encode.c:521
static ExplainStmt* _copyExplainStmt ( const ExplainStmt from)
static

Definition at line 3787 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3788 {
3789  ExplainStmt *newnode = makeNode(ExplainStmt);
3790 
3791  COPY_NODE_FIELD(query);
3793 
3794  return newnode;
3795 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static ExtensibleNode* _copyExtensibleNode ( const ExtensibleNode from)
static

Definition at line 4608 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4609 {
4610  ExtensibleNode *newnode;
4611  const ExtensibleNodeMethods *methods;
4612 
4613  methods = GetExtensibleNodeMethods(from->extnodename, false);
4614  newnode = (ExtensibleNode *) newNode(methods->node_size,
4616  COPY_STRING_FIELD(extnodename);
4617 
4618  /* copy the private fields */
4619  methods->nodeCopy(newnode, from);
4620 
4621  return newnode;
4622 }
void(* nodeCopy)(struct ExtensibleNode *newnode, const struct ExtensibleNode *oldnode)
Definition: extensible.h:64
#define newNode(size, tag)
Definition: nodes.h:548
#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 3349 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3350 {
3351  FetchStmt *newnode = makeNode(FetchStmt);
3352 
3353  COPY_SCALAR_FIELD(direction);
3354  COPY_SCALAR_FIELD(howMany);
3355  COPY_STRING_FIELD(portalname);
3356  COPY_SCALAR_FIELD(ismove);
3357 
3358  return newnode;
3359 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static FieldSelect* _copyFieldSelect ( const FieldSelect from)
static

Definition at line 1628 of file copyfuncs.c.

References arg, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

1629 {
1630  FieldSelect *newnode = makeNode(FieldSelect);
1631 
1633  COPY_SCALAR_FIELD(fieldnum);
1634  COPY_SCALAR_FIELD(resulttype);
1635  COPY_SCALAR_FIELD(resulttypmod);
1636  COPY_SCALAR_FIELD(resultcollid);
1637 
1638  return newnode;
1639 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
void * arg
static FieldStore* _copyFieldStore ( const FieldStore from)
static

Definition at line 1645 of file copyfuncs.c.

References arg, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

1646 {
1647  FieldStore *newnode = makeNode(FieldStore);
1648 
1650  COPY_NODE_FIELD(newvals);
1651  COPY_NODE_FIELD(fieldnums);
1652  COPY_SCALAR_FIELD(resulttype);
1653 
1654  return newnode;
1655 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
void * arg
static ForeignKeyCacheInfo* _copyForeignKeyCacheInfo ( const ForeignKeyCacheInfo from)
static

Definition at line 4659 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4660 {
4662 
4663  COPY_SCALAR_FIELD(conrelid);
4664  COPY_SCALAR_FIELD(confrelid);
4665  COPY_SCALAR_FIELD(nkeys);
4666  /* COPY_SCALAR_FIELD might work for these, but let's not assume that */
4667  memcpy(newnode->conkey, from->conkey, sizeof(newnode->conkey));
4668  memcpy(newnode->confkey, from->confkey, sizeof(newnode->confkey));
4669  memcpy(newnode->conpfeqop, from->conpfeqop, sizeof(newnode->conpfeqop));
4670 
4671  return newnode;
4672 }
AttrNumber conkey[INDEX_MAX_KEYS]
Definition: rel.h:243
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define makeNode(_type_)
Definition: nodes.h:558
Oid conpfeqop[INDEX_MAX_KEYS]
Definition: rel.h:245
AttrNumber confkey[INDEX_MAX_KEYS]
Definition: rel.h:244
static ForeignScan* _copyForeignScan ( const ForeignScan from)
static

Definition at line 736 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

737 {
738  ForeignScan *newnode = makeNode(ForeignScan);
739 
740  /*
741  * copy node superclass fields
742  */
743  CopyScanFields((const Scan *) from, (Scan *) newnode);
744 
745  /*
746  * copy remainder of node
747  */
748  COPY_SCALAR_FIELD(operation);
749  COPY_SCALAR_FIELD(fs_server);
750  COPY_NODE_FIELD(fdw_exprs);
751  COPY_NODE_FIELD(fdw_private);
752  COPY_NODE_FIELD(fdw_scan_tlist);
753  COPY_NODE_FIELD(fdw_recheck_quals);
754  COPY_BITMAPSET_FIELD(fs_relids);
755  COPY_SCALAR_FIELD(fsSystemCol);
756 
757  return newnode;
758 }
#define COPY_BITMAPSET_FIELD(fldname)
Definition: copyfuncs.c:49
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:405
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static FromExpr* _copyFromExpr ( const FromExpr from)
static

Definition at line 2095 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2096 {
2097  FromExpr *newnode = makeNode(FromExpr);
2098 
2099  COPY_NODE_FIELD(fromlist);
2100  COPY_NODE_FIELD(quals);
2101 
2102  return newnode;
2103 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static FuncCall* _copyFuncCall ( const FuncCall from)
static

Definition at line 2554 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2555 {
2556  FuncCall *newnode = makeNode(FuncCall);
2557 
2558  COPY_NODE_FIELD(funcname);
2560  COPY_NODE_FIELD(agg_order);
2561  COPY_NODE_FIELD(agg_filter);
2562  COPY_SCALAR_FIELD(agg_within_group);
2563  COPY_SCALAR_FIELD(agg_star);
2564  COPY_SCALAR_FIELD(agg_distinct);
2565  COPY_SCALAR_FIELD(func_variadic);
2566  COPY_NODE_FIELD(over);
2567  COPY_LOCATION_FIELD(location);
2568 
2569  return newnode;
2570 }
#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:558
static FuncExpr* _copyFuncExpr ( const FuncExpr from)
static

Definition at line 1439 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1440 {
1441  FuncExpr *newnode = makeNode(FuncExpr);
1442 
1443  COPY_SCALAR_FIELD(funcid);
1444  COPY_SCALAR_FIELD(funcresulttype);
1445  COPY_SCALAR_FIELD(funcretset);
1446  COPY_SCALAR_FIELD(funcvariadic);
1447  COPY_SCALAR_FIELD(funcformat);
1448  COPY_SCALAR_FIELD(funccollid);
1449  COPY_SCALAR_FIELD(inputcollid);
1451  COPY_LOCATION_FIELD(location);
1452 
1453  return newnode;
1454 }
#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:558
static FunctionParameter* _copyFunctionParameter ( const FunctionParameter from)
static

Definition at line 3419 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3420 {
3422 
3424  COPY_NODE_FIELD(argType);
3425  COPY_SCALAR_FIELD(mode);
3426  COPY_NODE_FIELD(defexpr);
3427 
3428  return newnode;
3429 }
#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:558
const char * name
Definition: encode.c:521
static FunctionScan* _copyFunctionScan ( const FunctionScan from)
static

Definition at line 608 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 351 of file copyfuncs.c.

References COPY_SCALAR_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 375 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

376 {
377  GatherMerge *newnode = makeNode(GatherMerge);
378 
379  /*
380  * copy node superclass fields
381  */
382  CopyPlanFields((const Plan *) from, (Plan *) newnode);
383 
384  /*
385  * copy remainder of node
386  */
387  COPY_SCALAR_FIELD(num_workers);
388  COPY_SCALAR_FIELD(rescan_param);
389  COPY_SCALAR_FIELD(numCols);
390  COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
391  COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
392  COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
393  COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
394 
395  return newnode;
396 }
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:115
#define makeNode(_type_)
Definition: nodes.h:558
int16 AttrNumber
Definition: attnum.h:21
static GrantRoleStmt* _copyGrantRoleStmt ( const GrantRoleStmt from)
static

Definition at line 3164 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3165 {
3166  GrantRoleStmt *newnode = makeNode(GrantRoleStmt);
3167 
3168  COPY_NODE_FIELD(granted_roles);
3169  COPY_NODE_FIELD(grantee_roles);
3170  COPY_SCALAR_FIELD(is_grant);
3171  COPY_SCALAR_FIELD(admin_opt);
3172  COPY_NODE_FIELD(grantor);
3173  COPY_SCALAR_FIELD(behavior);
3174 
3175  return newnode;
3176 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static GrantStmt* _copyGrantStmt ( const GrantStmt from)
static

Definition at line 3124 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3125 {
3126  GrantStmt *newnode = makeNode(GrantStmt);
3127 
3128  COPY_SCALAR_FIELD(is_grant);
3129  COPY_SCALAR_FIELD(targtype);
3130  COPY_SCALAR_FIELD(objtype);
3131  COPY_NODE_FIELD(objects);
3132  COPY_NODE_FIELD(privileges);
3133  COPY_NODE_FIELD(grantees);
3134  COPY_SCALAR_FIELD(grant_option);
3135  COPY_SCALAR_FIELD(behavior);
3136 
3137  return newnode;
3138 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static Group* _copyGroup ( const Group from)
static

Definition at line 946 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

947 {
948  Group *newnode = makeNode(Group);
949 
950  CopyPlanFields((const Plan *) from, (Plan *) newnode);
951 
952  COPY_SCALAR_FIELD(numCols);
953  COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
954  COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
955 
956  return newnode;
957 }
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:115
int numCols
Definition: plannodes.h:761
#define makeNode(_type_)
Definition: nodes.h:558
int16 AttrNumber
Definition: attnum.h:21
static GroupingFunc* _copyGroupingFunc ( const GroupingFunc from)
static

Definition at line 1380 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1381 {
1382  GroupingFunc *newnode = makeNode(GroupingFunc);
1383 
1385  COPY_NODE_FIELD(refs);
1386  COPY_NODE_FIELD(cols);
1387  COPY_SCALAR_FIELD(agglevelsup);
1388  COPY_LOCATION_FIELD(location);
1389 
1390  return newnode;
1391 }
#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:558
static GroupingSet* _copyGroupingSet ( const GroupingSet from)
static

Definition at line 2386 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2387 {
2388  GroupingSet *newnode = makeNode(GroupingSet);
2389 
2390  COPY_SCALAR_FIELD(kind);
2391  COPY_NODE_FIELD(content);
2392  COPY_LOCATION_FIELD(location);
2393 
2394  return newnode;
2395 }
#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:558
static Hash* _copyHash ( const Hash from)
static

Definition at line 1042 of file copyfuncs.c.

References COPY_SCALAR_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

1043 {
1044  Hash *newnode = makeNode(Hash);
1045 
1046  /*
1047  * copy node superclass fields
1048  */
1049  CopyPlanFields((const Plan *) from, (Plan *) newnode);
1050 
1051  /*
1052  * copy remainder of node
1053  */
1054  COPY_SCALAR_FIELD(skewTable);
1055  COPY_SCALAR_FIELD(skewColumn);
1056  COPY_SCALAR_FIELD(skewInherit);
1057 
1058  return newnode;
1059 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:115
#define makeNode(_type_)
Definition: nodes.h:558
static HashJoin* _copyHashJoin ( const HashJoin from)
static

Definition at line 884 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyJoinFields(), and makeNode.

Referenced by copyObjectImpl().

885 {
886  HashJoin *newnode = makeNode(HashJoin);
887 
888  /*
889  * copy node superclass fields
890  */
891  CopyJoinFields((const Join *) from, (Join *) newnode);
892 
893  /*
894  * copy remainder of node
895  */
896  COPY_NODE_FIELD(hashclauses);
897 
898  return newnode;
899 }
static void CopyJoinFields(const Join *from, Join *newnode)
Definition: copyfuncs.c:800
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static ImportForeignSchemaStmt* _copyImportForeignSchemaStmt ( const ImportForeignSchemaStmt from)
static

Definition at line 4093 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4094 {
4096 
4097  COPY_STRING_FIELD(server_name);
4098  COPY_STRING_FIELD(remote_schema);
4099  COPY_STRING_FIELD(local_schema);
4100  COPY_SCALAR_FIELD(list_type);
4101  COPY_NODE_FIELD(table_list);
4103 
4104  return newnode;
4105 }
#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:558
static IndexElem* _copyIndexElem ( const IndexElem from)
static

Definition at line 2785 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2786 {
2787  IndexElem *newnode = makeNode(IndexElem);
2788 
2790  COPY_NODE_FIELD(expr);
2791  COPY_STRING_FIELD(indexcolname);
2792  COPY_NODE_FIELD(collation);
2793  COPY_NODE_FIELD(opclass);
2794  COPY_SCALAR_FIELD(ordering);
2795  COPY_SCALAR_FIELD(nulls_ordering);
2796 
2797  return newnode;
2798 }
#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:558
const char * name
Definition: encode.c:521
static IndexOnlyScan* _copyIndexOnlyScan ( const IndexOnlyScan from)
static

Definition at line 496 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 469 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 3362 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3363 {
3364  IndexStmt *newnode = makeNode(IndexStmt);
3365 
3366  COPY_STRING_FIELD(idxname);
3367  COPY_NODE_FIELD(relation);
3368  COPY_STRING_FIELD(accessMethod);
3369  COPY_STRING_FIELD(tableSpace);
3370  COPY_NODE_FIELD(indexParams);
3372  COPY_NODE_FIELD(whereClause);
3373  COPY_NODE_FIELD(excludeOpNames);
3374  COPY_STRING_FIELD(idxcomment);
3375  COPY_SCALAR_FIELD(indexOid);
3376  COPY_SCALAR_FIELD(oldNode);
3377  COPY_SCALAR_FIELD(unique);
3378  COPY_SCALAR_FIELD(primary);
3379  COPY_SCALAR_FIELD(isconstraint);
3380  COPY_SCALAR_FIELD(deferrable);
3381  COPY_SCALAR_FIELD(initdeferred);
3382  COPY_SCALAR_FIELD(transformed);
3383  COPY_SCALAR_FIELD(concurrent);
3384  COPY_SCALAR_FIELD(if_not_exists);
3385 
3386  return newnode;
3387 }
#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:558
static InferClause* _copyInferClause ( const InferClause from)
static

Definition at line 2441 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

2442 {
2443  InferClause *newnode = makeNode(InferClause);
2444 
2445  COPY_NODE_FIELD(indexElems);
2446  COPY_NODE_FIELD(whereClause);
2447  COPY_STRING_FIELD(conname);
2448  COPY_LOCATION_FIELD(location);
2449 
2450  return newnode;
2451 }
#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:558
static InferenceElem* _copyInferenceElem ( const InferenceElem from)
static

Definition at line 2028 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2029 {
2030  InferenceElem *newnode = makeNode(InferenceElem);
2031 
2032  COPY_NODE_FIELD(expr);
2033  COPY_SCALAR_FIELD(infercollid);
2034  COPY_SCALAR_FIELD(inferopclass);
2035 
2036  return newnode;
2037 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static InsertStmt* _copyInsertStmt ( const InsertStmt from)
static

Definition at line 2981 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2982 {
2983  InsertStmt *newnode = makeNode(InsertStmt);
2984 
2985  COPY_NODE_FIELD(relation);
2986  COPY_NODE_FIELD(cols);
2987  COPY_NODE_FIELD(selectStmt);
2988  COPY_NODE_FIELD(onConflictClause);
2989  COPY_NODE_FIELD(returningList);
2990  COPY_NODE_FIELD(withClause);
2991  COPY_SCALAR_FIELD(override);
2992 
2993  return newnode;
2994 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static IntoClause* _copyIntoClause ( const IntoClause from)
static

Definition at line 1248 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

1249 {
1250  IntoClause *newnode = makeNode(IntoClause);
1251 
1252  COPY_NODE_FIELD(rel);
1253  COPY_NODE_FIELD(colNames);
1255  COPY_SCALAR_FIELD(onCommit);
1256  COPY_STRING_FIELD(tableSpaceName);
1257  COPY_NODE_FIELD(viewQuery);
1258  COPY_SCALAR_FIELD(skipData);
1259 
1260  return newnode;
1261 }
#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:558
static Join* _copyJoin ( const Join from)
static

Definition at line 814 of file copyfuncs.c.

References CopyJoinFields(), and makeNode.

Referenced by copyObjectImpl().

815 {
816  Join *newnode = makeNode(Join);
817 
818  /*
819  * copy node superclass fields
820  */
821  CopyJoinFields(from, newnode);
822 
823  return newnode;
824 }
static void CopyJoinFields(const Join *from, Join *newnode)
Definition: copyfuncs.c:800
#define makeNode(_type_)
Definition: nodes.h:558
static JoinExpr* _copyJoinExpr ( const JoinExpr from)
static

Definition at line 2075 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2076 {
2077  JoinExpr *newnode = makeNode(JoinExpr);
2078 
2079  COPY_SCALAR_FIELD(jointype);
2080  COPY_SCALAR_FIELD(isNatural);
2081  COPY_NODE_FIELD(larg);
2082  COPY_NODE_FIELD(rarg);
2083  COPY_NODE_FIELD(usingClause);
2084  COPY_NODE_FIELD(quals);
2085  COPY_NODE_FIELD(alias);
2086  COPY_SCALAR_FIELD(rtindex);
2087 
2088  return newnode;
2089 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static Limit* _copyLimit ( const Limit from)
static

Definition at line 1115 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

1116 {
1117  Limit *newnode = makeNode(Limit);
1118 
1119  /*
1120  * copy node superclass fields
1121  */
1122  CopyPlanFields((const Plan *) from, (Plan *) newnode);
1123 
1124  /*
1125  * copy remainder of node
1126  */
1127  COPY_NODE_FIELD(limitOffset);
1128  COPY_NODE_FIELD(limitCount);
1129 
1130  return newnode;
1131 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:115
#define makeNode(_type_)
Definition: nodes.h:558
static List* _copyList ( const List from)
static

Definition at line 4576 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4577 {
4578  List *new;
4579  ListCell *curr_old;
4580  ListCell *prev_new;
4581 
4582  Assert(list_length(from) >= 1);
4583 
4584  new = makeNode(List);
4585  new->length = from->length;
4586 
4587  COPY_NODE_CELL(new->head, from->head);
4588  prev_new = new->head;
4589  curr_old = lnext(from->head);
4590 
4591  while (curr_old)
4592  {
4593  COPY_NODE_CELL(prev_new->next, curr_old);
4594  prev_new = prev_new->next;
4595  curr_old = curr_old->next;
4596  }
4597  prev_new->next = NULL;
4598  new->tail = prev_new;
4599 
4600  return new;
4601 }
#define lnext(lc)
Definition: pg_list.h:105
#define COPY_NODE_CELL(new, old)
Definition: copyfuncs.c:4571
#define makeNode(_type_)
Definition: nodes.h:558
ListCell * next
Definition: pg_list.h:61
#define Assert(condition)
Definition: c.h:681
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 3548 of file copyfuncs.c.

References COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3549 {
3550  ListenStmt *newnode = makeNode(ListenStmt);
3551 
3552  COPY_STRING_FIELD(conditionname);
3553 
3554  return newnode;
3555 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static LoadStmt* _copyLoadStmt ( const LoadStmt from)
static

Definition at line 3643 of file copyfuncs.c.

References COPY_STRING_FIELD, filename, and makeNode.

Referenced by copyObjectImpl().

3644 {
3645  LoadStmt *newnode = makeNode(LoadStmt);
3646 
3648 
3649  return newnode;
3650 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:558
static char * filename
Definition: pg_dumpall.c:90
static LockingClause* _copyLockingClause ( const LockingClause from)
static

Definition at line 2875 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2876 {
2877  LockingClause *newnode = makeNode(LockingClause);
2878 
2879  COPY_NODE_FIELD(lockedRels);
2880  COPY_SCALAR_FIELD(strength);
2881  COPY_SCALAR_FIELD(waitPolicy);
2882 
2883  return newnode;
2884 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static LockRows* _copyLockRows ( const LockRows from)
static

Definition at line 1093 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1094 {
1095  LockRows *newnode = makeNode(LockRows);
1096 
1097  /*
1098  * copy node superclass fields
1099  */
1100  CopyPlanFields((const Plan *) from, (Plan *) newnode);
1101 
1102  /*
1103  * copy remainder of node
1104  */
1105  COPY_NODE_FIELD(rowMarks);
1106  COPY_SCALAR_FIELD(epqParam);
1107 
1108  return newnode;
1109 }
#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:115
#define makeNode(_type_)
Definition: nodes.h:558
static LockStmt* _copyLockStmt ( const LockStmt from)
static

Definition at line 4243 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4244 {
4245  LockStmt *newnode = makeNode(LockStmt);
4246 
4247  COPY_NODE_FIELD(relations);
4248  COPY_SCALAR_FIELD(mode);
4249  COPY_SCALAR_FIELD(nowait);
4250 
4251  return newnode;
4252 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static Material* _copyMaterial ( const Material from)
static

Definition at line 906 of file copyfuncs.c.

References CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

907 {
908  Material *newnode = makeNode(Material);
909 
910  /*
911  * copy node superclass fields
912  */
913  CopyPlanFields((const Plan *) from, (Plan *) newnode);
914 
915  return newnode;
916 }
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:115
#define makeNode(_type_)
Definition: nodes.h:558
static MergeAppend* _copyMergeAppend ( const MergeAppend from)
static

Definition at line 253 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

254 {
255  MergeAppend *newnode = makeNode(MergeAppend);
256 
257  /*
258  * copy node superclass fields
259  */
260  CopyPlanFields((const Plan *) from, (Plan *) newnode);
261 
262  /*
263  * copy remainder of node
264  */
265  COPY_NODE_FIELD(partitioned_rels);
266  COPY_NODE_FIELD(mergeplans);
267  COPY_SCALAR_FIELD(numCols);
268  COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
269  COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
270  COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
271  COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
272 
273  return newnode;
274 }
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:115
#define makeNode(_type_)
Definition: nodes.h:558
int16 AttrNumber
Definition: attnum.h:21
static MergeJoin* _copyMergeJoin ( const MergeJoin from)
static

Definition at line 853 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

854 {
855  MergeJoin *newnode = makeNode(MergeJoin);
856  int numCols;
857 
858  /*
859  * copy node superclass fields
860  */
861  CopyJoinFields((const Join *) from, (Join *) newnode);
862 
863  /*
864  * copy remainder of node
865  */
866  COPY_SCALAR_FIELD(skip_mark_restore);
867  COPY_NODE_FIELD(mergeclauses);
868  numCols = list_length(from->mergeclauses);
869  if (numCols > 0)
870  {
871  COPY_POINTER_FIELD(mergeFamilies, numCols * sizeof(Oid));
872  COPY_POINTER_FIELD(mergeCollations, numCols * sizeof(Oid));
873  COPY_POINTER_FIELD(mergeStrategies, numCols * sizeof(int));
874  COPY_POINTER_FIELD(mergeNullsFirst, numCols * sizeof(bool));
875  }
876 
877  return newnode;
878 }
unsigned int Oid
Definition: postgres_ext.h:31
List * mergeclauses
Definition: plannodes.h:711
static void CopyJoinFields(const Join *from, Join *newnode)
Definition: copyfuncs.c:800
#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
#define makeNode(_type_)
Definition: nodes.h:558
static int list_length(const List *l)
Definition: pg_list.h:89
static MinMaxExpr* _copyMinMaxExpr ( const MinMaxExpr from)
static

Definition at line 1863 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1864 {
1865  MinMaxExpr *newnode = makeNode(MinMaxExpr);
1866 
1867  COPY_SCALAR_FIELD(minmaxtype);
1868  COPY_SCALAR_FIELD(minmaxcollid);
1869  COPY_SCALAR_FIELD(inputcollid);
1870  COPY_SCALAR_FIELD(op);
1872  COPY_LOCATION_FIELD(location);
1873 
1874  return newnode;
1875 }
#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:558
static ModifyTable* _copyModifyTable ( const ModifyTable from)
static

Definition at line 191 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

192 {
193  ModifyTable *newnode = makeNode(ModifyTable);
194 
195  /*
196  * copy node superclass fields
197  */
198  CopyPlanFields((const Plan *) from, (Plan *) newnode);
199 
200  /*
201  * copy remainder of node
202  */
203  COPY_SCALAR_FIELD(operation);
204  COPY_SCALAR_FIELD(canSetTag);
205  COPY_SCALAR_FIELD(nominalRelation);
206  COPY_NODE_FIELD(partitioned_rels);
207  COPY_NODE_FIELD(resultRelations);
208  COPY_SCALAR_FIELD(resultRelIndex);
209  COPY_SCALAR_FIELD(rootResultRelIndex);
210  COPY_NODE_FIELD(plans);
211  COPY_NODE_FIELD(withCheckOptionLists);
212  COPY_NODE_FIELD(returningLists);
213  COPY_NODE_FIELD(fdwPrivLists);
214  COPY_BITMAPSET_FIELD(fdwDirectModifyPlans);
215  COPY_NODE_FIELD(rowMarks);
216  COPY_SCALAR_FIELD(epqParam);
217  COPY_SCALAR_FIELD(onConflictAction);
218  COPY_NODE_FIELD(arbiterIndexes);
219  COPY_NODE_FIELD(onConflictSet);
220  COPY_NODE_FIELD(onConflictWhere);
221  COPY_SCALAR_FIELD(exclRelRTI);
222  COPY_NODE_FIELD(exclRelTlist);
223 
224  return newnode;
225 }
#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:115
#define makeNode(_type_)
Definition: nodes.h:558
static MultiAssignRef* _copyMultiAssignRef ( const MultiAssignRef from)
static

Definition at line 2628 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2629 {
2631 
2632  COPY_NODE_FIELD(source);
2633  COPY_SCALAR_FIELD(colno);
2634  COPY_SCALAR_FIELD(ncolumns);
2635 
2636  return newnode;
2637 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:558
static NamedArgExpr* _copyNamedArgExpr ( const NamedArgExpr from)
static

Definition at line 1460 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1461 {
1462  NamedArgExpr *newnode = makeNode(NamedArgExpr);
1463 
1466  COPY_SCALAR_FIELD(argnumber);
1467  COPY_LOCATION_FIELD(location);
1468 
1469  return newnode;
1470 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45