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 ExplainStmt_copyExplainStmt (const ExplainStmt *from)
 
static CreateTableAsStmt_copyCreateTableAsStmt (const CreateTableAsStmt *from)
 
static RefreshMatViewStmt_copyRefreshMatViewStmt (const RefreshMatViewStmt *from)
 
static ReplicaIdentityStmt_copyReplicaIdentityStmt (const ReplicaIdentityStmt *from)
 
static AlterSystemStmt_copyAlterSystemStmt (const AlterSystemStmt *from)
 
static CreateSeqStmt_copyCreateSeqStmt (const CreateSeqStmt *from)
 
static AlterSeqStmt_copyAlterSeqStmt (const AlterSeqStmt *from)
 
static VariableSetStmt_copyVariableSetStmt (const VariableSetStmt *from)
 
static VariableShowStmt_copyVariableShowStmt (const VariableShowStmt *from)
 
static DiscardStmt_copyDiscardStmt (const DiscardStmt *from)
 
static CreateTableSpaceStmt_copyCreateTableSpaceStmt (const CreateTableSpaceStmt *from)
 
static DropTableSpaceStmt_copyDropTableSpaceStmt (const DropTableSpaceStmt *from)
 
static AlterTableSpaceOptionsStmt_copyAlterTableSpaceOptionsStmt (const AlterTableSpaceOptionsStmt *from)
 
static AlterTableMoveAllStmt_copyAlterTableMoveAllStmt (const AlterTableMoveAllStmt *from)
 
static CreateExtensionStmt_copyCreateExtensionStmt (const CreateExtensionStmt *from)
 
static AlterExtensionStmt_copyAlterExtensionStmt (const AlterExtensionStmt *from)
 
static AlterExtensionContentsStmt_copyAlterExtensionContentsStmt (const AlterExtensionContentsStmt *from)
 
static CreateFdwStmt_copyCreateFdwStmt (const CreateFdwStmt *from)
 
static AlterFdwStmt_copyAlterFdwStmt (const AlterFdwStmt *from)
 
static CreateForeignServerStmt_copyCreateForeignServerStmt (const CreateForeignServerStmt *from)
 
static AlterForeignServerStmt_copyAlterForeignServerStmt (const AlterForeignServerStmt *from)
 
static CreateUserMappingStmt_copyCreateUserMappingStmt (const CreateUserMappingStmt *from)
 
static AlterUserMappingStmt_copyAlterUserMappingStmt (const AlterUserMappingStmt *from)
 
static DropUserMappingStmt_copyDropUserMappingStmt (const DropUserMappingStmt *from)
 
static CreateForeignTableStmt_copyCreateForeignTableStmt (const CreateForeignTableStmt *from)
 
static ImportForeignSchemaStmt_copyImportForeignSchemaStmt (const ImportForeignSchemaStmt *from)
 
static CreateTransformStmt_copyCreateTransformStmt (const CreateTransformStmt *from)
 
static CreateAmStmt_copyCreateAmStmt (const CreateAmStmt *from)
 
static CreateTrigStmt_copyCreateTrigStmt (const CreateTrigStmt *from)
 
static CreateEventTrigStmt_copyCreateEventTrigStmt (const CreateEventTrigStmt *from)
 
static AlterEventTrigStmt_copyAlterEventTrigStmt (const AlterEventTrigStmt *from)
 
static CreatePLangStmt_copyCreatePLangStmt (const CreatePLangStmt *from)
 
static CreateRoleStmt_copyCreateRoleStmt (const CreateRoleStmt *from)
 
static AlterRoleStmt_copyAlterRoleStmt (const AlterRoleStmt *from)
 
static AlterRoleSetStmt_copyAlterRoleSetStmt (const AlterRoleSetStmt *from)
 
static DropRoleStmt_copyDropRoleStmt (const DropRoleStmt *from)
 
static LockStmt_copyLockStmt (const LockStmt *from)
 
static ConstraintsSetStmt_copyConstraintsSetStmt (const ConstraintsSetStmt *from)
 
static ReindexStmt_copyReindexStmt (const ReindexStmt *from)
 
static CreateSchemaStmt_copyCreateSchemaStmt (const CreateSchemaStmt *from)
 
static CreateConversionStmt_copyCreateConversionStmt (const CreateConversionStmt *from)
 
static CreateCastStmt_copyCreateCastStmt (const CreateCastStmt *from)
 
static PrepareStmt_copyPrepareStmt (const PrepareStmt *from)
 
static ExecuteStmt_copyExecuteStmt (const ExecuteStmt *from)
 
static DeallocateStmt_copyDeallocateStmt (const DeallocateStmt *from)
 
static DropOwnedStmt_copyDropOwnedStmt (const DropOwnedStmt *from)
 
static ReassignOwnedStmt_copyReassignOwnedStmt (const ReassignOwnedStmt *from)
 
static AlterTSDictionaryStmt_copyAlterTSDictionaryStmt (const AlterTSDictionaryStmt *from)
 
static AlterTSConfigurationStmt_copyAlterTSConfigurationStmt (const AlterTSConfigurationStmt *from)
 
static CreatePolicyStmt_copyCreatePolicyStmt (const CreatePolicyStmt *from)
 
static AlterPolicyStmt_copyAlterPolicyStmt (const AlterPolicyStmt *from)
 
static PartitionSpec_copyPartitionSpec (const PartitionSpec *from)
 
static PartitionElem_copyPartitionElem (const PartitionElem *from)
 
static PartitionBoundSpec_copyPartitionBoundSpec (const PartitionBoundSpec *from)
 
static PartitionRangeDatum_copyPartitionRangeDatum (const PartitionRangeDatum *from)
 
static PartitionCmd_copyPartitionCmd (const PartitionCmd *from)
 
static CreatePublicationStmt_copyCreatePublicationStmt (const CreatePublicationStmt *from)
 
static AlterPublicationStmt_copyAlterPublicationStmt (const AlterPublicationStmt *from)
 
static CreateSubscriptionStmt_copyCreateSubscriptionStmt (const CreateSubscriptionStmt *from)
 
static AlterSubscriptionStmt_copyAlterSubscriptionStmt (const AlterSubscriptionStmt *from)
 
static DropSubscriptionStmt_copyDropSubscriptionStmt (const DropSubscriptionStmt *from)
 
static List_copyList (const List *from)
 
static ExtensibleNode_copyExtensibleNode (const ExtensibleNode *from)
 
static Value_copyValue (const Value *from)
 
static ForeignKeyCacheInfo_copyForeignKeyCacheInfo (const ForeignKeyCacheInfo *from)
 
void * 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:849
void * copyObjectImpl(const void *from)
Definition: copyfuncs.c:4664

Definition at line 4553 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(), _copyVacuumStmt(), _copyValuesScan(), _copyVariableSetStmt(), _copyViewStmt(), _copyWindowAgg(), _copyWindowClause(), _copyWindowDef(), _copyWindowFunc(), _copyWithCheckOption(), _copyWithClause(), _copyXmlExpr(), _copyXmlSerialize(), CopyCreateStmtFields(), CopyJoinFields(), and CopyPlanFields().

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

Definition at line 57 of file copyfuncs.c.

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

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

Definition at line 41 of file copyfuncs.c.

Referenced by _copyAConst(), _copyAExpr(), _copyAgg(), _copyAggref(), _copyAIndices(), _copyAlterDomainStmt(), _copyAlterEnumStmt(), _copyAlterEventTrigStmt(), _copyAlterExtensionContentsStmt(), _copyAlterForeignServerStmt(), _copyAlterObjectDependsStmt(), _copyAlterObjectSchemaStmt(), _copyAlterOpFamilyStmt(), _copyAlterOwnerStmt(), _copyAlterPublicationStmt(), _copyAlterRoleStmt(), _copyAlterSeqStmt(), _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(), _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 2600 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2601 {
2602  A_ArrayExpr *newnode = makeNode(A_ArrayExpr);
2603 
2604  COPY_NODE_FIELD(elements);
2605  COPY_LOCATION_FIELD(location);
2606 
2607  return newnode;
2608 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:557
static A_Indirection* _copyA_Indirection ( const A_Indirection from)
static

Definition at line 2589 of file copyfuncs.c.

References arg, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2590 {
2591  A_Indirection *newnode = makeNode(A_Indirection);
2592 
2594  COPY_NODE_FIELD(indirection);
2595 
2596  return newnode;
2597 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
void * arg
static AccessPriv* _copyAccessPriv ( const AccessPriv from)
static

Definition at line 3147 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3148 {
3149  AccessPriv *newnode = makeNode(AccessPriv);
3150 
3151  COPY_STRING_FIELD(priv_name);
3152  COPY_NODE_FIELD(cols);
3153 
3154  return newnode;
3155 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static A_Const* _copyAConst ( const A_Const from)
static

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

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

Definition at line 2483 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2484 {
2485  A_Expr *newnode = makeNode(A_Expr);
2486 
2487  COPY_SCALAR_FIELD(kind);
2489  COPY_NODE_FIELD(lexpr);
2490  COPY_NODE_FIELD(rexpr);
2491  COPY_LOCATION_FIELD(location);
2492 
2493  return newnode;
2494 }
#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:557
const char * name
Definition: encode.c:521
static Agg* _copyAgg ( const Agg from)
static

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

960 {
961  Agg *newnode = makeNode(Agg);
962 
963  CopyPlanFields((const Plan *) from, (Plan *) newnode);
964 
965  COPY_SCALAR_FIELD(aggstrategy);
966  COPY_SCALAR_FIELD(aggsplit);
967  COPY_SCALAR_FIELD(numCols);
968  if (from->numCols > 0)
969  {
970  COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
971  COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
972  }
973  COPY_SCALAR_FIELD(numGroups);
974  COPY_BITMAPSET_FIELD(aggParams);
975  COPY_NODE_FIELD(groupingSets);
976  COPY_NODE_FIELD(chain);
977 
978  return newnode;
979 }
#define COPY_BITMAPSET_FIELD(fldname)
Definition: copyfuncs.c:49
int numCols
Definition: plannodes.h:776
unsigned int Oid
Definition: postgres_ext.h:31
#define COPY_POINTER_FIELD(fldname, sz)
Definition: copyfuncs.c:57
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:557
Definition: plannodes.h:771
int16 AttrNumber
Definition: attnum.h:21
static Aggref* _copyAggref ( const Aggref from)
static

Definition at line 1349 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 2577 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2578 {
2579  A_Indices *newnode = makeNode(A_Indices);
2580 
2581  COPY_SCALAR_FIELD(is_slice);
2582  COPY_NODE_FIELD(lidx);
2583  COPY_NODE_FIELD(uidx);
2584 
2585  return newnode;
2586 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static Alias* _copyAlias ( const Alias from)
static

Definition at line 1188 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 3093 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3094 {
3096 
3097  COPY_NODE_FIELD(collname);
3098 
3099  return newnode;
3100 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlterDatabaseSetStmt* _copyAlterDatabaseSetStmt ( const AlterDatabaseSetStmt from)
static

Definition at line 3736 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObjectImpl().

3737 {
3739 
3741  COPY_NODE_FIELD(setstmt);
3742 
3743  return newnode;
3744 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
char * dbname
Definition: streamutil.c:38
static AlterDatabaseStmt* _copyAlterDatabaseStmt ( const AlterDatabaseStmt from)
static

Definition at line 3725 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObjectImpl().

3726 {
3728 
3731 
3732  return newnode;
3733 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
char * dbname
Definition: streamutil.c:38
static AlterDefaultPrivilegesStmt* _copyAlterDefaultPrivilegesStmt ( const AlterDefaultPrivilegesStmt from)
static

Definition at line 3173 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3174 {
3176 
3178  COPY_NODE_FIELD(action);
3179 
3180  return newnode;
3181 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlterDomainStmt* _copyAlterDomainStmt ( const AlterDomainStmt from)
static

Definition at line 3103 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3104 {
3106 
3107  COPY_SCALAR_FIELD(subtype);
3108  COPY_NODE_FIELD(typeName);
3110  COPY_NODE_FIELD(def);
3111  COPY_SCALAR_FIELD(behavior);
3112  COPY_SCALAR_FIELD(missing_ok);
3113 
3114  return newnode;
3115 }
#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:557
const char * name
Definition: encode.c:521
static AlterEnumStmt* _copyAlterEnumStmt ( const AlterEnumStmt from)
static

Definition at line 3607 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3608 {
3609  AlterEnumStmt *newnode = makeNode(AlterEnumStmt);
3610 
3611  COPY_NODE_FIELD(typeName);
3612  COPY_STRING_FIELD(oldVal);
3613  COPY_STRING_FIELD(newVal);
3614  COPY_STRING_FIELD(newValNeighbor);
3615  COPY_SCALAR_FIELD(newValIsAfter);
3616  COPY_SCALAR_FIELD(skipIfNewValExists);
3617 
3618  return newnode;
3619 }
#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:557
static AlterEventTrigStmt* _copyAlterEventTrigStmt ( const AlterEventTrigStmt from)
static

Definition at line 4153 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4154 {
4156 
4157  COPY_STRING_FIELD(trigname);
4158  COPY_SCALAR_FIELD(tgenabled);
4159 
4160  return newnode;
4161 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static AlterExtensionContentsStmt* _copyAlterExtensionContentsStmt ( const AlterExtensionContentsStmt from)
static

Definition at line 3961 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3962 {
3964 
3965  COPY_STRING_FIELD(extname);
3966  COPY_SCALAR_FIELD(action);
3967  COPY_SCALAR_FIELD(objtype);
3968  COPY_NODE_FIELD(object);
3969 
3970  return newnode;
3971 }
#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:557
static AlterExtensionStmt* _copyAlterExtensionStmt ( const AlterExtensionStmt from)
static

Definition at line 3950 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3951 {
3953 
3954  COPY_STRING_FIELD(extname);
3956 
3957  return newnode;
3958 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static AlterFdwStmt* _copyAlterFdwStmt ( const AlterFdwStmt from)
static

Definition at line 3986 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3987 {
3988  AlterFdwStmt *newnode = makeNode(AlterFdwStmt);
3989 
3990  COPY_STRING_FIELD(fdwname);
3991  COPY_NODE_FIELD(func_options);
3993 
3994  return newnode;
3995 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static AlterForeignServerStmt* _copyAlterForeignServerStmt ( const AlterForeignServerStmt from)
static

Definition at line 4013 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4014 {
4016 
4017  COPY_STRING_FIELD(servername);
4018  COPY_STRING_FIELD(version);
4020  COPY_SCALAR_FIELD(has_version);
4021 
4022  return newnode;
4023 }
#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:557
static AlterFunctionStmt* _copyAlterFunctionStmt ( const AlterFunctionStmt from)
static

Definition at line 3426 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3427 {
3429 
3430  COPY_NODE_FIELD(func);
3431  COPY_NODE_FIELD(actions);
3432 
3433  return newnode;
3434 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlternativeSubPlan* _copyAlternativeSubPlan ( const AlternativeSubPlan from)
static

Definition at line 1613 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 3464 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3465 {
3467 
3468  COPY_SCALAR_FIELD(objectType);
3469  COPY_NODE_FIELD(relation);
3470  COPY_NODE_FIELD(object);
3471  COPY_NODE_FIELD(extname);
3472 
3473  return newnode;
3474 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlterObjectSchemaStmt* _copyAlterObjectSchemaStmt ( const AlterObjectSchemaStmt from)
static

Definition at line 3477 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3478 {
3480 
3481  COPY_SCALAR_FIELD(objectType);
3482  COPY_NODE_FIELD(relation);
3483  COPY_NODE_FIELD(object);
3484  COPY_STRING_FIELD(newschema);
3485  COPY_SCALAR_FIELD(missing_ok);
3486 
3487  return newnode;
3488 }
#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:557
static AlterOperatorStmt* _copyAlterOperatorStmt ( const AlterOperatorStmt from)
static

Definition at line 3504 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3505 {
3507 
3508  COPY_NODE_FIELD(opername);
3510 
3511  return newnode;
3512 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlterOpFamilyStmt* _copyAlterOpFamilyStmt ( const AlterOpFamilyStmt from)
static

Definition at line 3701 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3702 {
3704 
3705  COPY_NODE_FIELD(opfamilyname);
3706  COPY_STRING_FIELD(amname);
3707  COPY_SCALAR_FIELD(isDrop);
3708  COPY_NODE_FIELD(items);
3709 
3710  return newnode;
3711 }
#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:557
static AlterOwnerStmt* _copyAlterOwnerStmt ( const AlterOwnerStmt from)
static

Definition at line 3491 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3492 {
3494 
3495  COPY_SCALAR_FIELD(objectType);
3496  COPY_NODE_FIELD(relation);
3497  COPY_NODE_FIELD(object);
3498  COPY_NODE_FIELD(newowner);
3499 
3500  return newnode;
3501 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlterPolicyStmt* _copyAlterPolicyStmt ( const AlterPolicyStmt from)
static

Definition at line 4401 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4402 {
4404 
4405  COPY_STRING_FIELD(policy_name);
4406  COPY_NODE_FIELD(table);
4407  COPY_NODE_FIELD(roles);
4408  COPY_NODE_FIELD(qual);
4409  COPY_NODE_FIELD(with_check);
4410 
4411  return newnode;
4412 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static AlterPublicationStmt* _copyAlterPublicationStmt ( const AlterPublicationStmt from)
static

Definition at line 4491 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4492 {
4494 
4495  COPY_STRING_FIELD(pubname);
4497  COPY_NODE_FIELD(tables);
4498  COPY_SCALAR_FIELD(for_all_tables);
4499  COPY_SCALAR_FIELD(tableAction);
4500 
4501  return newnode;
4502 }
#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:557
static AlterRoleSetStmt* _copyAlterRoleSetStmt ( const AlterRoleSetStmt from)
static

Definition at line 4203 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4204 {
4206 
4207  COPY_NODE_FIELD(role);
4208  COPY_STRING_FIELD(database);
4209  COPY_NODE_FIELD(setstmt);
4210 
4211  return newnode;
4212 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static AlterRoleStmt* _copyAlterRoleStmt ( const AlterRoleStmt from)
static

Definition at line 4191 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4192 {
4193  AlterRoleStmt *newnode = makeNode(AlterRoleStmt);
4194 
4195  COPY_NODE_FIELD(role);
4197  COPY_SCALAR_FIELD(action);
4198 
4199  return newnode;
4200 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlterSeqStmt* _copyAlterSeqStmt ( const AlterSeqStmt from)
static

Definition at line 3842 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3843 {
3844  AlterSeqStmt *newnode = makeNode(AlterSeqStmt);
3845 
3846  COPY_NODE_FIELD(sequence);
3848  COPY_SCALAR_FIELD(for_identity);
3849  COPY_SCALAR_FIELD(missing_ok);
3850 
3851  return newnode;
3852 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlterSubscriptionStmt* _copyAlterSubscriptionStmt ( const AlterSubscriptionStmt from)
static

Definition at line 4518 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4519 {
4521 
4522  COPY_SCALAR_FIELD(kind);
4523  COPY_STRING_FIELD(subname);
4524  COPY_STRING_FIELD(conninfo);
4525  COPY_NODE_FIELD(publication);
4527 
4528  return newnode;
4529 }
#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:557
static AlterSystemStmt* _copyAlterSystemStmt ( const AlterSystemStmt from)
static

Definition at line 3818 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3819 {
3821 
3822  COPY_NODE_FIELD(setstmt);
3823 
3824  return newnode;
3825 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlterTableCmd* _copyAlterTableCmd ( const AlterTableCmd from)
static

Definition at line 3078 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3079 {
3080  AlterTableCmd *newnode = makeNode(AlterTableCmd);
3081 
3082  COPY_SCALAR_FIELD(subtype);
3084  COPY_NODE_FIELD(newowner);
3085  COPY_NODE_FIELD(def);
3086  COPY_SCALAR_FIELD(behavior);
3087  COPY_SCALAR_FIELD(missing_ok);
3088 
3089  return newnode;
3090 }
#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:557
const char * name
Definition: encode.c:521
static AlterTableMoveAllStmt* _copyAlterTableMoveAllStmt ( const AlterTableMoveAllStmt from)
static

Definition at line 3924 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3925 {
3927 
3928  COPY_STRING_FIELD(orig_tablespacename);
3929  COPY_SCALAR_FIELD(objtype);
3930  COPY_NODE_FIELD(roles);
3931  COPY_STRING_FIELD(new_tablespacename);
3932  COPY_SCALAR_FIELD(nowait);
3933 
3934  return newnode;
3935 }
#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:557
static AlterTableSpaceOptionsStmt* _copyAlterTableSpaceOptionsStmt ( const AlterTableSpaceOptionsStmt from)
static

Definition at line 3912 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3913 {
3915 
3916  COPY_STRING_FIELD(tablespacename);
3918  COPY_SCALAR_FIELD(isReset);
3919 
3920  return newnode;
3921 }
#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:557
static AlterTableStmt* _copyAlterTableStmt ( const AlterTableStmt from)
static

Definition at line 3065 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3066 {
3068 
3069  COPY_NODE_FIELD(relation);
3070  COPY_NODE_FIELD(cmds);
3071  COPY_SCALAR_FIELD(relkind);
3072  COPY_SCALAR_FIELD(missing_ok);
3073 
3074  return newnode;
3075 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlterTSConfigurationStmt* _copyAlterTSConfigurationStmt ( const AlterTSConfigurationStmt from)
static

Definition at line 4369 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4370 {
4372 
4373  COPY_SCALAR_FIELD(kind);
4374  COPY_NODE_FIELD(cfgname);
4375  COPY_NODE_FIELD(tokentype);
4376  COPY_NODE_FIELD(dicts);
4377  COPY_SCALAR_FIELD(override);
4378  COPY_SCALAR_FIELD(replace);
4379  COPY_SCALAR_FIELD(missing_ok);
4380 
4381  return newnode;
4382 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlterTSDictionaryStmt* _copyAlterTSDictionaryStmt ( const AlterTSDictionaryStmt from)
static

Definition at line 4358 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

4359 {
4361 
4362  COPY_NODE_FIELD(dictname);
4364 
4365  return newnode;
4366 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlterUserMappingStmt* _copyAlterUserMappingStmt ( const AlterUserMappingStmt from)
static

Definition at line 4039 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, makeNode, and user.

Referenced by copyObjectImpl().

4040 {
4042 
4044  COPY_STRING_FIELD(servername);
4046 
4047  return newnode;
4048 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static char * user
Definition: pg_regress.c:92
static Append* _copyAppend ( const Append from)
static

Definition at line 229 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 2235 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 1694 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 1793 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 1417 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 2569 of file copyfuncs.c.

References makeNode.

Referenced by copyObjectImpl().

2570 {
2571  A_Star *newnode = makeNode(A_Star);
2572 
2573  return newnode;
2574 }
#define makeNode(_type_)
Definition: nodes.h:557
static BitmapAnd* _copyBitmapAnd ( const BitmapAnd from)
static

Definition at line 306 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 541 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 517 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 327 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 1933 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 1552 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1553 {
1554  BoolExpr *newnode = makeNode(BoolExpr);
1555 
1558  COPY_LOCATION_FIELD(location);
1559 
1560  return newnode;
1561 }
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:557
static CaseExpr* _copyCaseExpr ( const CaseExpr from)
static

Definition at line 1745 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 1778 of file copyfuncs.c.

References COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 1763 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, makeNode, and result.

Referenced by copyObjectImpl().

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

Definition at line 3196 of file copyfuncs.c.

References COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3197 {
3199 
3200  COPY_STRING_FIELD(portalname);
3201 
3202  return newnode;
3203 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static ClusterStmt* _copyClusterStmt ( const ClusterStmt from)
static

Definition at line 3206 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3207 {
3208  ClusterStmt *newnode = makeNode(ClusterStmt);
3209 
3210  COPY_NODE_FIELD(relation);
3211  COPY_STRING_FIELD(indexname);
3213 
3214  return newnode;
3215 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
static int verbose
Definition: pg_basebackup.c:84
#define makeNode(_type_)
Definition: nodes.h:557
static CoalesceExpr* _copyCoalesceExpr ( const CoalesceExpr from)
static

Definition at line 1846 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 1948 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 1966 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 1677 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 2769 of file copyfuncs.c.

References arg, COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2770 {
2771  CollateClause *newnode = makeNode(CollateClause);
2772 
2774  COPY_NODE_FIELD(collname);
2775  COPY_LOCATION_FIELD(location);
2776 
2777  return newnode;
2778 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:557
void * arg
static CollateExpr* _copyCollateExpr ( const CollateExpr from)
static

Definition at line 1730 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 2797 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 2497 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2498 {
2499  ColumnRef *newnode = makeNode(ColumnRef);
2500 
2501  COPY_NODE_FIELD(fields);
2502  COPY_LOCATION_FIELD(location);
2503 
2504  return newnode;
2505 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_LOCATION_FIELD(fldname)
Definition: copyfuncs.c:65
#define makeNode(_type_)
Definition: nodes.h:557
static CommentStmt* _copyCommentStmt ( const CommentStmt from)
static

Definition at line 3318 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3319 {
3320  CommentStmt *newnode = makeNode(CommentStmt);
3321 
3322  COPY_SCALAR_FIELD(objtype);
3323  COPY_NODE_FIELD(object);
3324  COPY_STRING_FIELD(comment);
3325 
3326  return newnode;
3327 }
#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:557
static CommonTableExpr* _copyCommonTableExpr ( const CommonTableExpr from)
static

Definition at line 2464 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 3574 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3575 {
3577 
3578  COPY_NODE_FIELD(typevar);
3579  COPY_NODE_FIELD(coldeflist);
3580 
3581  return newnode;
3582 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static Const* _copyConst ( const Const from)
static

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

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

Definition at line 2821 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 4238 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4239 {
4241 
4242  COPY_NODE_FIELD(constraints);
4243  COPY_SCALAR_FIELD(deferred);
4244 
4245  return newnode;
4246 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static ConvertRowtypeExpr* _copyConvertRowtypeExpr ( const ConvertRowtypeExpr from)
static

Definition at line 1714 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 3218 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3219 {
3220  CopyStmt *newnode = makeNode(CopyStmt);
3221 
3222  COPY_NODE_FIELD(relation);
3223  COPY_NODE_FIELD(query);
3224  COPY_NODE_FIELD(attlist);
3225  COPY_SCALAR_FIELD(is_from);
3226  COPY_SCALAR_FIELD(is_program);
3229 
3230  return newnode;
3231 }
#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:557
static char * filename
Definition: pg_dumpall.c:87
static CreateAmStmt* _copyCreateAmStmt ( const CreateAmStmt from)
static

Definition at line 4105 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4106 {
4107  CreateAmStmt *newnode = makeNode(CreateAmStmt);
4108 
4109  COPY_STRING_FIELD(amname);
4110  COPY_NODE_FIELD(handler_name);
4111  COPY_SCALAR_FIELD(amtype);
4112 
4113  return newnode;
4114 }
#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:557
static CreateCastStmt* _copyCreateCastStmt ( const CreateCastStmt from)
static

Definition at line 4289 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4290 {
4292 
4293  COPY_NODE_FIELD(sourcetype);
4294  COPY_NODE_FIELD(targettype);
4295  COPY_NODE_FIELD(func);
4296  COPY_SCALAR_FIELD(context);
4297  COPY_SCALAR_FIELD(inout);
4298 
4299  return newnode;
4300 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static CreateConversionStmt* _copyCreateConversionStmt ( const CreateConversionStmt from)
static

Definition at line 4275 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4276 {
4278 
4279  COPY_NODE_FIELD(conversion_name);
4280  COPY_STRING_FIELD(for_encoding_name);
4281  COPY_STRING_FIELD(to_encoding_name);
4282  COPY_NODE_FIELD(func_name);
4283  COPY_SCALAR_FIELD(def);
4284 
4285  return newnode;
4286 }
#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:557
static CreatedbStmt* _copyCreatedbStmt ( const CreatedbStmt from)
static

Definition at line 3714 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObjectImpl().

3715 {
3716  CreatedbStmt *newnode = makeNode(CreatedbStmt);
3717 
3720 
3721  return newnode;
3722 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
char * dbname
Definition: streamutil.c:38
static CreateDomainStmt* _copyCreateDomainStmt ( const CreateDomainStmt from)
static

Definition at line 3647 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3648 {
3650 
3651  COPY_NODE_FIELD(domainname);
3652  COPY_NODE_FIELD(typeName);
3653  COPY_NODE_FIELD(collClause);
3654  COPY_NODE_FIELD(constraints);
3655 
3656  return newnode;
3657 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static CreateEnumStmt* _copyCreateEnumStmt ( const CreateEnumStmt from)
static

Definition at line 3585 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3586 {
3588 
3589  COPY_NODE_FIELD(typeName);
3590  COPY_NODE_FIELD(vals);
3591 
3592  return newnode;
3593 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static CreateEventTrigStmt* _copyCreateEventTrigStmt ( const CreateEventTrigStmt from)
static

Definition at line 4140 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4141 {
4143 
4144  COPY_STRING_FIELD(trigname);
4145  COPY_STRING_FIELD(eventname);
4146  COPY_NODE_FIELD(whenclause);
4147  COPY_NODE_FIELD(funcname);
4148 
4149  return newnode;
4150 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static CreateExtensionStmt* _copyCreateExtensionStmt ( const CreateExtensionStmt from)
static

Definition at line 3938 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3939 {
3941 
3942  COPY_STRING_FIELD(extname);
3943  COPY_SCALAR_FIELD(if_not_exists);
3945 
3946  return newnode;
3947 }
#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:557
static CreateFdwStmt* _copyCreateFdwStmt ( const CreateFdwStmt from)
static

Definition at line 3974 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3975 {
3976  CreateFdwStmt *newnode = makeNode(CreateFdwStmt);
3977 
3978  COPY_STRING_FIELD(fdwname);
3979  COPY_NODE_FIELD(func_options);
3981 
3982  return newnode;
3983 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static CreateForeignServerStmt* _copyCreateForeignServerStmt ( const CreateForeignServerStmt from)
static

Definition at line 3998 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3999 {
4001 
4002  COPY_STRING_FIELD(servername);
4003  COPY_STRING_FIELD(servertype);
4004  COPY_STRING_FIELD(version);
4005  COPY_STRING_FIELD(fdwname);
4007  COPY_SCALAR_FIELD(if_not_exists);
4008 
4009  return newnode;
4010 }
#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:557
static CreateForeignTableStmt* _copyCreateForeignTableStmt ( const CreateForeignTableStmt from)
static

Definition at line 4063 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4064 {
4066 
4067  CopyCreateStmtFields((const CreateStmt *) from, (CreateStmt *) newnode);
4068 
4069  COPY_STRING_FIELD(servername);
4071 
4072  return newnode;
4073 }
static void CopyCreateStmtFields(const CreateStmt *from, CreateStmt *newnode)
Definition: copyfuncs.c:3240
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static CreateFunctionStmt* _copyCreateFunctionStmt ( const CreateFunctionStmt from)
static

Definition at line 3398 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3399 {
3401 
3402  COPY_SCALAR_FIELD(replace);
3403  COPY_NODE_FIELD(funcname);
3404  COPY_NODE_FIELD(parameters);
3405  COPY_NODE_FIELD(returnType);
3407  COPY_NODE_FIELD(withClause);
3408 
3409  return newnode;
3410 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static CreateOpClassItem* _copyCreateOpClassItem ( const CreateOpClassItem from)
static

Definition at line 3675 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, makeNode, and name.

Referenced by copyObjectImpl().

3676 {
3678 
3679  COPY_SCALAR_FIELD(itemtype);
3681  COPY_SCALAR_FIELD(number);
3682  COPY_NODE_FIELD(order_family);
3683  COPY_NODE_FIELD(class_args);
3684  COPY_NODE_FIELD(storedtype);
3685 
3686  return newnode;
3687 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
const char * name
Definition: encode.c:521
static CreateOpClassStmt* _copyCreateOpClassStmt ( const CreateOpClassStmt from)
static

Definition at line 3660 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3661 {
3663 
3664  COPY_NODE_FIELD(opclassname);
3665  COPY_NODE_FIELD(opfamilyname);
3666  COPY_STRING_FIELD(amname);
3667  COPY_NODE_FIELD(datatype);
3668  COPY_NODE_FIELD(items);
3669  COPY_SCALAR_FIELD(isDefault);
3670 
3671  return newnode;
3672 }
#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:557
static CreateOpFamilyStmt* _copyCreateOpFamilyStmt ( const CreateOpFamilyStmt from)
static

Definition at line 3690 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3691 {
3693 
3694  COPY_NODE_FIELD(opfamilyname);
3695  COPY_STRING_FIELD(amname);
3696 
3697  return newnode;
3698 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static CreatePLangStmt* _copyCreatePLangStmt ( const CreatePLangStmt from)
static

Definition at line 4164 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4165 {
4167 
4168  COPY_SCALAR_FIELD(replace);
4169  COPY_STRING_FIELD(plname);
4170  COPY_NODE_FIELD(plhandler);
4171  COPY_NODE_FIELD(plinline);
4172  COPY_NODE_FIELD(plvalidator);
4173  COPY_SCALAR_FIELD(pltrusted);
4174 
4175  return newnode;
4176 }
#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:557
static CreatePolicyStmt* _copyCreatePolicyStmt ( const CreatePolicyStmt from)
static

Definition at line 4385 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4386 {
4388 
4389  COPY_STRING_FIELD(policy_name);
4390  COPY_NODE_FIELD(table);
4391  COPY_STRING_FIELD(cmd_name);
4392  COPY_SCALAR_FIELD(permissive);
4393  COPY_NODE_FIELD(roles);
4394  COPY_NODE_FIELD(qual);
4395  COPY_NODE_FIELD(with_check);
4396 
4397  return newnode;
4398 }
#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:557
static CreatePublicationStmt* _copyCreatePublicationStmt ( const CreatePublicationStmt from)
static

Definition at line 4478 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4479 {
4481 
4482  COPY_STRING_FIELD(pubname);
4484  COPY_NODE_FIELD(tables);
4485  COPY_SCALAR_FIELD(for_all_tables);
4486 
4487  return newnode;
4488 }
#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:557
static CreateRangeStmt* _copyCreateRangeStmt ( const CreateRangeStmt from)
static

Definition at line 3596 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3597 {
3599 
3600  COPY_NODE_FIELD(typeName);
3601  COPY_NODE_FIELD(params);
3602 
3603  return newnode;
3604 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static CreateRoleStmt* _copyCreateRoleStmt ( const CreateRoleStmt from)
static

Definition at line 4179 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4180 {
4182 
4183  COPY_SCALAR_FIELD(stmt_type);
4184  COPY_STRING_FIELD(role);
4186 
4187  return newnode;
4188 }
#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:557
static CreateSchemaStmt* _copyCreateSchemaStmt ( const CreateSchemaStmt from)
static

Definition at line 4262 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4263 {
4265 
4266  COPY_STRING_FIELD(schemaname);
4267  COPY_NODE_FIELD(authrole);
4268  COPY_NODE_FIELD(schemaElts);
4269  COPY_SCALAR_FIELD(if_not_exists);
4270 
4271  return newnode;
4272 }
#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:557
static CreateSeqStmt* _copyCreateSeqStmt ( const CreateSeqStmt from)
static

Definition at line 3828 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3829 {
3830  CreateSeqStmt *newnode = makeNode(CreateSeqStmt);
3831 
3832  COPY_NODE_FIELD(sequence);
3834  COPY_SCALAR_FIELD(ownerId);
3835  COPY_SCALAR_FIELD(for_identity);
3836  COPY_SCALAR_FIELD(if_not_exists);
3837 
3838  return newnode;
3839 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static CreateStatsStmt* _copyCreateStatsStmt ( const CreateStatsStmt from)
static

Definition at line 3384 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3385 {
3387 
3388  COPY_NODE_FIELD(defnames);
3389  COPY_NODE_FIELD(relation);
3390  COPY_NODE_FIELD(keys);
3392  COPY_SCALAR_FIELD(if_not_exists);
3393 
3394  return newnode;
3395 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static CreateStmt* _copyCreateStmt ( const CreateStmt from)
static

Definition at line 3256 of file copyfuncs.c.

References CopyCreateStmtFields(), and makeNode.

Referenced by copyObjectImpl().

3257 {
3258  CreateStmt *newnode = makeNode(CreateStmt);
3259 
3260  CopyCreateStmtFields(from, newnode);
3261 
3262  return newnode;
3263 }
static void CopyCreateStmtFields(const CreateStmt *from, CreateStmt *newnode)
Definition: copyfuncs.c:3240
#define makeNode(_type_)
Definition: nodes.h:557
static CreateSubscriptionStmt* _copyCreateSubscriptionStmt ( const CreateSubscriptionStmt from)
static

Definition at line 4505 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4506 {
4508 
4509  COPY_STRING_FIELD(subname);
4510  COPY_STRING_FIELD(conninfo);
4511  COPY_NODE_FIELD(publication);
4513 
4514  return newnode;
4515 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static CreateTableAsStmt* _copyCreateTableAsStmt ( const CreateTableAsStmt from)
static

Definition at line 3781 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3782 {
3784 
3785  COPY_NODE_FIELD(query);
3786  COPY_NODE_FIELD(into);
3787  COPY_SCALAR_FIELD(relkind);
3788  COPY_SCALAR_FIELD(is_select_into);
3789  COPY_SCALAR_FIELD(if_not_exists);
3790 
3791  return newnode;
3792 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static CreateTableSpaceStmt* _copyCreateTableSpaceStmt ( const CreateTableSpaceStmt from)
static

Definition at line 3888 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3889 {
3891 
3892  COPY_STRING_FIELD(tablespacename);
3893  COPY_NODE_FIELD(owner);
3894  COPY_STRING_FIELD(location);
3896 
3897  return newnode;
3898 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static CreateTransformStmt* _copyCreateTransformStmt ( const CreateTransformStmt from)
static

Definition at line 4091 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4092 {
4094 
4095  COPY_SCALAR_FIELD(replace);
4096  COPY_NODE_FIELD(type_name);
4097  COPY_STRING_FIELD(lang);
4098  COPY_NODE_FIELD(fromsql);
4099  COPY_NODE_FIELD(tosql);
4100 
4101  return newnode;
4102 }
#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:557
static CreateTrigStmt* _copyCreateTrigStmt ( const CreateTrigStmt from)
static

Definition at line 4117 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4118 {
4120 
4121  COPY_STRING_FIELD(trigname);
4122  COPY_NODE_FIELD(relation);
4123  COPY_NODE_FIELD(funcname);
4125  COPY_SCALAR_FIELD(row);
4126  COPY_SCALAR_FIELD(timing);
4127  COPY_SCALAR_FIELD(events);
4128  COPY_NODE_FIELD(columns);
4129  COPY_NODE_FIELD(whenClause);
4130  COPY_SCALAR_FIELD(isconstraint);
4131  COPY_NODE_FIELD(transitionRels);
4132  COPY_SCALAR_FIELD(deferrable);
4133  COPY_SCALAR_FIELD(initdeferred);
4134  COPY_NODE_FIELD(constrrel);
4135 
4136  return newnode;
4137 }
#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:557
static CreateUserMappingStmt* _copyCreateUserMappingStmt ( const CreateUserMappingStmt from)
static

Definition at line 4026 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4027 {
4029 
4031  COPY_STRING_FIELD(servername);
4033  COPY_SCALAR_FIELD(if_not_exists);
4034 
4035  return newnode;
4036 }
#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:557
static char * user
Definition: pg_regress.c:92
static CteScan* _copyCteScan ( const CteScan from)
static

Definition at line 668 of file copyfuncs.c.

References COPY_SCALAR_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 1998 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 760 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 4326 of file copyfuncs.c.

References COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObjectImpl().

4327 {
4329 
4331 
4332  return newnode;
4333 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
const char * name
Definition: encode.c:521
static DeclareCursorStmt* _copyDeclareCursorStmt ( const DeclareCursorStmt from)
static

Definition at line 3184 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3185 {
3187 
3188  COPY_STRING_FIELD(portalname);
3190  COPY_NODE_FIELD(query);
3191 
3192  return newnode;
3193 }
#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:557
static DefElem* _copyDefElem ( const DefElem from)
static

Definition at line 2856 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2857 {
2858  DefElem *newnode = makeNode(DefElem);
2859 
2860  COPY_STRING_FIELD(defnamespace);
2861  COPY_STRING_FIELD(defname);
2863  COPY_SCALAR_FIELD(defaction);
2864  COPY_LOCATION_FIELD(location);
2865 
2866  return newnode;
2867 }
#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:557
void * arg
static DefineStmt* _copyDefineStmt ( const DefineStmt from)
static

Definition at line 3277 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3278 {
3279  DefineStmt *newnode = makeNode(DefineStmt);
3280 
3281  COPY_SCALAR_FIELD(kind);
3282  COPY_SCALAR_FIELD(oldstyle);
3283  COPY_NODE_FIELD(defnames);
3285  COPY_NODE_FIELD(definition);
3286  COPY_SCALAR_FIELD(if_not_exists);
3287 
3288  return newnode;
3289 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static DeleteStmt* _copyDeleteStmt ( const DeleteStmt from)
static

Definition at line 2992 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2993 {
2994  DeleteStmt *newnode = makeNode(DeleteStmt);
2995 
2996  COPY_NODE_FIELD(relation);
2997  COPY_NODE_FIELD(usingClause);
2998  COPY_NODE_FIELD(whereClause);
2999  COPY_NODE_FIELD(returningList);
3000  COPY_NODE_FIELD(withClause);
3001 
3002  return newnode;
3003 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static DiscardStmt* _copyDiscardStmt ( const DiscardStmt from)
static

Definition at line 3878 of file copyfuncs.c.

References COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3879 {
3880  DiscardStmt *newnode = makeNode(DiscardStmt);
3881 
3882  COPY_SCALAR_FIELD(target);
3883 
3884  return newnode;
3885 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define makeNode(_type_)
Definition: nodes.h:557
static DistinctExpr* _copyDistinctExpr ( const DistinctExpr from)
static

Definition at line 1494 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 3437 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3438 {
3439  DoStmt *newnode = makeNode(DoStmt);
3440 
3442 
3443  return newnode;
3444 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static DropdbStmt* _copyDropdbStmt ( const DropdbStmt from)
static

Definition at line 3747 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObjectImpl().

3748 {
3749  DropdbStmt *newnode = makeNode(DropdbStmt);
3750 
3752  COPY_SCALAR_FIELD(missing_ok);
3753 
3754  return newnode;
3755 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
char * dbname
Definition: streamutil.c:38
static DropOwnedStmt* _copyDropOwnedStmt ( const DropOwnedStmt from)
static

Definition at line 4336 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4337 {
4338  DropOwnedStmt *newnode = makeNode(DropOwnedStmt);
4339 
4340  COPY_NODE_FIELD(roles);
4341  COPY_SCALAR_FIELD(behavior);
4342 
4343  return newnode;
4344 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static DropRoleStmt* _copyDropRoleStmt ( const DropRoleStmt from)
static

Definition at line 4215 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4216 {
4217  DropRoleStmt *newnode = makeNode(DropRoleStmt);
4218 
4219  COPY_NODE_FIELD(roles);
4220  COPY_SCALAR_FIELD(missing_ok);
4221 
4222  return newnode;
4223 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static DropStmt* _copyDropStmt ( const DropStmt from)
static

Definition at line 3292 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3293 {
3294  DropStmt *newnode = makeNode(DropStmt);
3295 
3296  COPY_NODE_FIELD(objects);
3297  COPY_SCALAR_FIELD(removeType);
3298  COPY_SCALAR_FIELD(behavior);
3299  COPY_SCALAR_FIELD(missing_ok);
3300  COPY_SCALAR_FIELD(concurrent);
3301 
3302  return newnode;
3303 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static DropSubscriptionStmt* _copyDropSubscriptionStmt ( const DropSubscriptionStmt from)
static

Definition at line 4532 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4533 {
4535 
4536  COPY_STRING_FIELD(subname);
4537  COPY_SCALAR_FIELD(drop_slot);
4538  COPY_SCALAR_FIELD(missing_ok);
4539 
4540  return newnode;
4541 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static DropTableSpaceStmt* _copyDropTableSpaceStmt ( const DropTableSpaceStmt from)
static

Definition at line 3901 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3902 {
3904 
3905  COPY_STRING_FIELD(tablespacename);
3906  COPY_SCALAR_FIELD(missing_ok);
3907 
3908  return newnode;
3909 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static DropUserMappingStmt* _copyDropUserMappingStmt ( const DropUserMappingStmt from)
static

Definition at line 4051 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4052 {
4054 
4056  COPY_STRING_FIELD(servername);
4057  COPY_SCALAR_FIELD(missing_ok);
4058 
4059  return newnode;
4060 }
#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:557
static char * user
Definition: pg_regress.c:92
static ExecuteStmt* _copyExecuteStmt ( const ExecuteStmt from)
static

Definition at line 4315 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObjectImpl().

4316 {
4317  ExecuteStmt *newnode = makeNode(ExecuteStmt);
4318 
4320  COPY_NODE_FIELD(params);
4321 
4322  return newnode;
4323 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
const char * name
Definition: encode.c:521
static ExplainStmt* _copyExplainStmt ( const ExplainStmt from)
static

Definition at line 3770 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3771 {
3772  ExplainStmt *newnode = makeNode(ExplainStmt);
3773 
3774  COPY_NODE_FIELD(query);
3776 
3777  return newnode;
3778 }
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static ExtensibleNode* _copyExtensibleNode ( const ExtensibleNode from)
static

Definition at line 4590 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4591 {
4592  ExtensibleNode *newnode;
4593  const ExtensibleNodeMethods *methods;
4594 
4595  methods = GetExtensibleNodeMethods(from->extnodename, false);
4596  newnode = (ExtensibleNode *) newNode(methods->node_size,
4598  COPY_STRING_FIELD(extnodename);
4599 
4600  /* copy the private fields */
4601  methods->nodeCopy(newnode, from);
4602 
4603  return newnode;
4604 }
void(* nodeCopy)(struct ExtensibleNode *newnode, const struct ExtensibleNode *oldnode)
Definition: extensible.h:64
#define newNode(size, tag)
Definition: nodes.h:547
#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 3343 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3344 {
3345  FetchStmt *newnode = makeNode(FetchStmt);
3346 
3347  COPY_SCALAR_FIELD(direction);
3348  COPY_SCALAR_FIELD(howMany);
3349  COPY_STRING_FIELD(portalname);
3350  COPY_SCALAR_FIELD(ismove);
3351 
3352  return newnode;
3353 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static FieldSelect* _copyFieldSelect ( const FieldSelect from)
static

Definition at line 1626 of file copyfuncs.c.

References arg, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 1643 of file copyfuncs.c.

References arg, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 4641 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4642 {
4644 
4645  COPY_SCALAR_FIELD(conrelid);
4646  COPY_SCALAR_FIELD(confrelid);
4647  COPY_SCALAR_FIELD(nkeys);
4648  /* COPY_SCALAR_FIELD might work for these, but let's not assume that */
4649  memcpy(newnode->conkey, from->conkey, sizeof(newnode->conkey));
4650  memcpy(newnode->confkey, from->confkey, sizeof(newnode->confkey));
4651  memcpy(newnode->conpfeqop, from->conpfeqop, sizeof(newnode->conpfeqop));
4652 
4653  return newnode;
4654 }
AttrNumber conkey[INDEX_MAX_KEYS]
Definition: rel.h:243
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define makeNode(_type_)
Definition: nodes.h:557
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 732 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 2094 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 2550 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 1437 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 3413 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3414 {
3416 
3418  COPY_NODE_FIELD(argType);
3419  COPY_SCALAR_FIELD(mode);
3420  COPY_NODE_FIELD(defexpr);
3421 
3422  return newnode;
3423 }
#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:557
const char * name
Definition: encode.c:521
static FunctionScan* _copyFunctionScan ( const FunctionScan from)
static

Definition at line 604 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 349 of file copyfuncs.c.

References COPY_SCALAR_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 372 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 3158 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3159 {
3160  GrantRoleStmt *newnode = makeNode(GrantRoleStmt);
3161 
3162  COPY_NODE_FIELD(granted_roles);
3163  COPY_NODE_FIELD(grantee_roles);
3164  COPY_SCALAR_FIELD(is_grant);
3165  COPY_SCALAR_FIELD(admin_opt);
3166  COPY_NODE_FIELD(grantor);
3167  COPY_SCALAR_FIELD(behavior);
3168 
3169  return newnode;
3170 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static GrantStmt* _copyGrantStmt ( const GrantStmt from)
static

Definition at line 3118 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3119 {
3120  GrantStmt *newnode = makeNode(GrantStmt);
3121 
3122  COPY_SCALAR_FIELD(is_grant);
3123  COPY_SCALAR_FIELD(targtype);
3124  COPY_SCALAR_FIELD(objtype);
3125  COPY_NODE_FIELD(objects);
3126  COPY_NODE_FIELD(privileges);
3127  COPY_NODE_FIELD(grantees);
3128  COPY_SCALAR_FIELD(grant_option);
3129  COPY_SCALAR_FIELD(behavior);
3130 
3131  return newnode;
3132 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static Group* _copyGroup ( const Group from)
static

Definition at line 942 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

943 {
944  Group *newnode = makeNode(Group);
945 
946  CopyPlanFields((const Plan *) from, (Plan *) newnode);
947 
948  COPY_SCALAR_FIELD(numCols);
949  COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
950  COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
951 
952  return newnode;
953 }
unsigned int Oid
Definition: postgres_ext.h:31
#define COPY_POINTER_FIELD(fldname, sz)
Definition: copyfuncs.c:57
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
int numCols
Definition: plannodes.h:752
#define makeNode(_type_)
Definition: nodes.h:557
int16 AttrNumber
Definition: attnum.h:21
static GroupingFunc* _copyGroupingFunc ( const GroupingFunc from)
static

Definition at line 1378 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 2382 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2383 {
2384  GroupingSet *newnode = makeNode(GroupingSet);
2385 
2386  COPY_SCALAR_FIELD(kind);
2387  COPY_NODE_FIELD(content);
2388  COPY_LOCATION_FIELD(location);
2389 
2390  return newnode;
2391 }
#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:557
static Hash* _copyHash ( const Hash from)
static

Definition at line 1038 of file copyfuncs.c.

References COPY_SCALAR_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 880 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyJoinFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 4076 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4077 {
4079 
4080  COPY_STRING_FIELD(server_name);
4081  COPY_STRING_FIELD(remote_schema);
4082  COPY_STRING_FIELD(local_schema);
4083  COPY_SCALAR_FIELD(list_type);
4084  COPY_NODE_FIELD(table_list);
4086 
4087  return newnode;
4088 }
#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:557
static IndexElem* _copyIndexElem ( const IndexElem from)
static

Definition at line 2781 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 492 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 465 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 3356 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 2437 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

2438 {
2439  InferClause *newnode = makeNode(InferClause);
2440 
2441  COPY_NODE_FIELD(indexElems);
2442  COPY_NODE_FIELD(whereClause);
2443  COPY_STRING_FIELD(conname);
2444  COPY_LOCATION_FIELD(location);
2445 
2446  return newnode;
2447 }
#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:557
static InferenceElem* _copyInferenceElem ( const InferenceElem from)
static

Definition at line 2027 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 2976 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2977 {
2978  InsertStmt *newnode = makeNode(InsertStmt);
2979 
2980  COPY_NODE_FIELD(relation);
2981  COPY_NODE_FIELD(cols);
2982  COPY_NODE_FIELD(selectStmt);
2983  COPY_NODE_FIELD(onConflictClause);
2984  COPY_NODE_FIELD(returningList);
2985  COPY_NODE_FIELD(withClause);
2986  COPY_SCALAR_FIELD(override);
2987 
2988  return newnode;
2989 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static IntoClause* _copyIntoClause ( const IntoClause from)
static

Definition at line 1246 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 810 of file copyfuncs.c.

References CopyJoinFields(), and makeNode.

Referenced by copyObjectImpl().

811 {
812  Join *newnode = makeNode(Join);
813 
814  /*
815  * copy node superclass fields
816  */
817  CopyJoinFields(from, newnode);
818 
819  return newnode;
820 }
static void CopyJoinFields(const Join *from, Join *newnode)
Definition: copyfuncs.c:796
#define makeNode(_type_)
Definition: nodes.h:557
static JoinExpr* _copyJoinExpr ( const JoinExpr from)
static

Definition at line 2074 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 1113 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 4558 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4559 {
4560  List *new;
4561  ListCell *curr_old;
4562  ListCell *prev_new;
4563 
4564  Assert(list_length(from) >= 1);
4565 
4566  new = makeNode(List);
4567  new->length = from->length;
4568 
4569  COPY_NODE_CELL(new->head, from->head);
4570  prev_new = new->head;
4571  curr_old = lnext(from->head);
4572 
4573  while (curr_old)
4574  {
4575  COPY_NODE_CELL(prev_new->next, curr_old);
4576  prev_new = prev_new->next;
4577  curr_old = curr_old->next;
4578  }
4579  prev_new->next = NULL;
4580  new->tail = prev_new;
4581 
4582  return new;
4583 }
#define lnext(lc)
Definition: pg_list.h:105
#define COPY_NODE_CELL(new, old)
Definition: copyfuncs.c:4553
#define makeNode(_type_)
Definition: nodes.h:557
ListCell * next
Definition: pg_list.h:61
#define NULL
Definition: c.h:229
#define Assert(condition)
Definition: c.h:675
static int list_length(const List *l)
Definition: pg_list.h:89
int length
Definition: pg_list.h:48
ListCell * head
Definition: pg_list.h:49
Definition: pg_list.h:45
static ListenStmt* _copyListenStmt ( const ListenStmt from)
static

Definition at line 3542 of file copyfuncs.c.

References COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3543 {
3544  ListenStmt *newnode = makeNode(ListenStmt);
3545 
3546  COPY_STRING_FIELD(conditionname);
3547 
3548  return newnode;
3549 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static LoadStmt* _copyLoadStmt ( const LoadStmt from)
static

Definition at line 3637 of file copyfuncs.c.

References COPY_STRING_FIELD, filename, and makeNode.

Referenced by copyObjectImpl().

3638 {
3639  LoadStmt *newnode = makeNode(LoadStmt);
3640 
3642 
3643  return newnode;
3644 }
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static char * filename
Definition: pg_dumpall.c:87
static LockingClause* _copyLockingClause ( const LockingClause from)
static

Definition at line 2870 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2871 {
2872  LockingClause *newnode = makeNode(LockingClause);
2873 
2874  COPY_NODE_FIELD(lockedRels);
2875  COPY_SCALAR_FIELD(strength);
2876  COPY_SCALAR_FIELD(waitPolicy);
2877 
2878  return newnode;
2879 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static LockRows* _copyLockRows ( const LockRows from)
static

Definition at line 1091 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1092 {
1093  LockRows *newnode = makeNode(LockRows);
1094 
1095  /*
1096  * copy node superclass fields
1097  */
1098  CopyPlanFields((const Plan *) from, (Plan *) newnode);
1099 
1100  /*
1101  * copy remainder of node
1102  */
1103  COPY_NODE_FIELD(rowMarks);
1104  COPY_SCALAR_FIELD(epqParam);
1105 
1106  return newnode;
1107 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:557
static LockStmt* _copyLockStmt ( const LockStmt from)
static

Definition at line 4226 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4227 {
4228  LockStmt *newnode = makeNode(LockStmt);
4229 
4230  COPY_NODE_FIELD(relations);
4231  COPY_SCALAR_FIELD(mode);
4232  COPY_SCALAR_FIELD(nowait);
4233 
4234  return newnode;
4235 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static Material* _copyMaterial ( const Material from)
static

Definition at line 902 of file copyfuncs.c.

References CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

903 {
904  Material *newnode = makeNode(Material);
905 
906  /*
907  * copy node superclass fields
908  */
909  CopyPlanFields((const Plan *) from, (Plan *) newnode);
910 
911  return newnode;
912 }
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:114
#define makeNode(_type_)
Definition: nodes.h:557
static MergeAppend* _copyMergeAppend ( const MergeAppend from)
static

Definition at line 251 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 849 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 1862 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 190 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 2624 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2625 {
2627 
2628  COPY_NODE_FIELD(source);
2629  COPY_SCALAR_FIELD(colno);
2630  COPY_SCALAR_FIELD(ncolumns);
2631 
2632  return newnode;
2633 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static NamedArgExpr* _copyNamedArgExpr ( const NamedArgExpr from)
static

Definition at line 1458 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

1459 {
1460  NamedArgExpr *newnode = makeNode(NamedArgExpr);
1461 
1464  COPY_SCALAR_FIELD(argnumber);
1465  COPY_LOCATION_FIELD(location);
1466 
1467  return newnode;
1468 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45