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 PartitionElem_copyPartitionElem (const PartitionElem *from)
 
static PartitionSpec_copyPartitionSpec (const PartitionSpec *from)
 
static PartitionBoundSpec_copyPartitionBoundSpec (const PartitionBoundSpec *from)
 
static PartitionRangeDatum_copyPartitionRangeDatum (const PartitionRangeDatum *from)
 
static PartitionCmd_copyPartitionCmd (const PartitionCmd *from)
 
static CreatePublicationStmt_copyCreatePublicationStmt (const CreatePublicationStmt *from)
 
static AlterPublicationStmt_copyAlterPublicationStmt (const AlterPublicationStmt *from)
 
static CreateSubscriptionStmt_copyCreateSubscriptionStmt (const CreateSubscriptionStmt *from)
 
static AlterSubscriptionStmt_copyAlterSubscriptionStmt (const AlterSubscriptionStmt *from)
 
static DropSubscriptionStmt_copyDropSubscriptionStmt (const DropSubscriptionStmt *from)
 
static List_copyList (const List *from)
 
static ExtensibleNode_copyExtensibleNode (const ExtensibleNode *from)
 
static Value_copyValue (const Value *from)
 
static ForeignKeyCacheInfo_copyForeignKeyCacheInfo (const ForeignKeyCacheInfo *from)
 
void * copyObjectImpl (const void *from)
 

Macro Definition Documentation

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

Definition at line 4557 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 2603 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2604 {
2605  A_ArrayExpr *newnode = makeNode(A_ArrayExpr);
2606 
2607  COPY_NODE_FIELD(elements);
2608  COPY_LOCATION_FIELD(location);
2609 
2610  return newnode;
2611 }
#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 2592 of file copyfuncs.c.

References arg, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2593 {
2594  A_Indirection *newnode = makeNode(A_Indirection);
2595 
2597  COPY_NODE_FIELD(indirection);
2598 
2599  return newnode;
2600 }
#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 3151 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3152 {
3153  AccessPriv *newnode = makeNode(AccessPriv);
3154 
3155  COPY_STRING_FIELD(priv_name);
3156  COPY_NODE_FIELD(cols);
3157 
3158  return newnode;
3159 }
#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 2522 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().

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

Definition at line 2486 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2487 {
2488  A_Expr *newnode = makeNode(A_Expr);
2489 
2490  COPY_SCALAR_FIELD(kind);
2492  COPY_NODE_FIELD(lexpr);
2493  COPY_NODE_FIELD(rexpr);
2494  COPY_LOCATION_FIELD(location);
2495 
2496  return newnode;
2497 }
#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 961 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().

962 {
963  Agg *newnode = makeNode(Agg);
964 
965  CopyPlanFields((const Plan *) from, (Plan *) newnode);
966 
967  COPY_SCALAR_FIELD(aggstrategy);
968  COPY_SCALAR_FIELD(aggsplit);
969  COPY_SCALAR_FIELD(numCols);
970  if (from->numCols > 0)
971  {
972  COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
973  COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
974  }
975  COPY_SCALAR_FIELD(numGroups);
976  COPY_BITMAPSET_FIELD(aggParams);
977  COPY_NODE_FIELD(groupingSets);
978  COPY_NODE_FIELD(chain);
979 
980  return newnode;
981 }
#define COPY_BITMAPSET_FIELD(fldname)
Definition: copyfuncs.c:49
int numCols
Definition: plannodes.h:785
unsigned int Oid
Definition: postgres_ext.h:31
#define COPY_POINTER_FIELD(fldname, sz)
Definition: copyfuncs.c:57
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:115
#define makeNode(_type_)
Definition: nodes.h:557
Definition: plannodes.h:780
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 2580 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2581 {
2582  A_Indices *newnode = makeNode(A_Indices);
2583 
2584  COPY_SCALAR_FIELD(is_slice);
2585  COPY_NODE_FIELD(lidx);
2586  COPY_NODE_FIELD(uidx);
2587 
2588  return newnode;
2589 }
#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 3097 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3098 {
3100 
3101  COPY_NODE_FIELD(collname);
3102 
3103  return newnode;
3104 }
#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 3740 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObjectImpl().

3741 {
3743 
3745  COPY_NODE_FIELD(setstmt);
3746 
3747  return newnode;
3748 }
#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:39
static AlterDatabaseStmt* _copyAlterDatabaseStmt ( const AlterDatabaseStmt from)
static

Definition at line 3729 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObjectImpl().

3730 {
3732 
3735 
3736  return newnode;
3737 }
#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:39
static AlterDefaultPrivilegesStmt* _copyAlterDefaultPrivilegesStmt ( const AlterDefaultPrivilegesStmt from)
static

Definition at line 3177 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3178 {
3180 
3182  COPY_NODE_FIELD(action);
3183 
3184  return newnode;
3185 }
#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 3107 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3108 {
3110 
3111  COPY_SCALAR_FIELD(subtype);
3112  COPY_NODE_FIELD(typeName);
3114  COPY_NODE_FIELD(def);
3115  COPY_SCALAR_FIELD(behavior);
3116  COPY_SCALAR_FIELD(missing_ok);
3117 
3118  return newnode;
3119 }
#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 3611 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3612 {
3613  AlterEnumStmt *newnode = makeNode(AlterEnumStmt);
3614 
3615  COPY_NODE_FIELD(typeName);
3616  COPY_STRING_FIELD(oldVal);
3617  COPY_STRING_FIELD(newVal);
3618  COPY_STRING_FIELD(newValNeighbor);
3619  COPY_SCALAR_FIELD(newValIsAfter);
3620  COPY_SCALAR_FIELD(skipIfNewValExists);
3621 
3622  return newnode;
3623 }
#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 4157 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4158 {
4160 
4161  COPY_STRING_FIELD(trigname);
4162  COPY_SCALAR_FIELD(tgenabled);
4163 
4164  return newnode;
4165 }
#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 3965 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3966 {
3968 
3969  COPY_STRING_FIELD(extname);
3970  COPY_SCALAR_FIELD(action);
3971  COPY_SCALAR_FIELD(objtype);
3972  COPY_NODE_FIELD(object);
3973 
3974  return newnode;
3975 }
#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 3954 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3955 {
3957 
3958  COPY_STRING_FIELD(extname);
3960 
3961  return newnode;
3962 }
#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 3990 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3991 {
3992  AlterFdwStmt *newnode = makeNode(AlterFdwStmt);
3993 
3994  COPY_STRING_FIELD(fdwname);
3995  COPY_NODE_FIELD(func_options);
3997 
3998  return newnode;
3999 }
#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 4017 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4018 {
4020 
4021  COPY_STRING_FIELD(servername);
4022  COPY_STRING_FIELD(version);
4024  COPY_SCALAR_FIELD(has_version);
4025 
4026  return newnode;
4027 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static AlterFunctionStmt* _copyAlterFunctionStmt ( const AlterFunctionStmt from)
static

Definition at line 3430 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3431 {
3433 
3434  COPY_NODE_FIELD(func);
3435  COPY_NODE_FIELD(actions);
3436 
3437  return newnode;
3438 }
#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 3468 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3469 {
3471 
3472  COPY_SCALAR_FIELD(objectType);
3473  COPY_NODE_FIELD(relation);
3474  COPY_NODE_FIELD(object);
3475  COPY_NODE_FIELD(extname);
3476 
3477  return newnode;
3478 }
#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 3481 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3482 {
3484 
3485  COPY_SCALAR_FIELD(objectType);
3486  COPY_NODE_FIELD(relation);
3487  COPY_NODE_FIELD(object);
3488  COPY_STRING_FIELD(newschema);
3489  COPY_SCALAR_FIELD(missing_ok);
3490 
3491  return newnode;
3492 }
#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 3508 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3509 {
3511 
3512  COPY_NODE_FIELD(opername);
3514 
3515  return newnode;
3516 }
#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 3705 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3706 {
3708 
3709  COPY_NODE_FIELD(opfamilyname);
3710  COPY_STRING_FIELD(amname);
3711  COPY_SCALAR_FIELD(isDrop);
3712  COPY_NODE_FIELD(items);
3713 
3714  return newnode;
3715 }
#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 3495 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3496 {
3498 
3499  COPY_SCALAR_FIELD(objectType);
3500  COPY_NODE_FIELD(relation);
3501  COPY_NODE_FIELD(object);
3502  COPY_NODE_FIELD(newowner);
3503 
3504  return newnode;
3505 }
#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 4405 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4406 {
4408 
4409  COPY_STRING_FIELD(policy_name);
4410  COPY_NODE_FIELD(table);
4411  COPY_NODE_FIELD(roles);
4412  COPY_NODE_FIELD(qual);
4413  COPY_NODE_FIELD(with_check);
4414 
4415  return newnode;
4416 }
#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 4495 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4496 {
4498 
4499  COPY_STRING_FIELD(pubname);
4501  COPY_NODE_FIELD(tables);
4502  COPY_SCALAR_FIELD(for_all_tables);
4503  COPY_SCALAR_FIELD(tableAction);
4504 
4505  return newnode;
4506 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static AlterRoleSetStmt* _copyAlterRoleSetStmt ( const AlterRoleSetStmt from)
static

Definition at line 4207 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4208 {
4210 
4211  COPY_NODE_FIELD(role);
4212  COPY_STRING_FIELD(database);
4213  COPY_NODE_FIELD(setstmt);
4214 
4215  return newnode;
4216 }
#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 4195 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4196 {
4197  AlterRoleStmt *newnode = makeNode(AlterRoleStmt);
4198 
4199  COPY_NODE_FIELD(role);
4201  COPY_SCALAR_FIELD(action);
4202 
4203  return newnode;
4204 }
#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 3846 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3847 {
3848  AlterSeqStmt *newnode = makeNode(AlterSeqStmt);
3849 
3850  COPY_NODE_FIELD(sequence);
3852  COPY_SCALAR_FIELD(for_identity);
3853  COPY_SCALAR_FIELD(missing_ok);
3854 
3855  return newnode;
3856 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define makeNode(_type_)
Definition: nodes.h:557
static AlterSubscriptionStmt* _copyAlterSubscriptionStmt ( const AlterSubscriptionStmt from)
static

Definition at line 4522 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4523 {
4525 
4526  COPY_SCALAR_FIELD(kind);
4527  COPY_STRING_FIELD(subname);
4528  COPY_STRING_FIELD(conninfo);
4529  COPY_NODE_FIELD(publication);
4531 
4532  return newnode;
4533 }
#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 3822 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3823 {
3825 
3826  COPY_NODE_FIELD(setstmt);
3827 
3828  return newnode;
3829 }
#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 3082 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3083 {
3084  AlterTableCmd *newnode = makeNode(AlterTableCmd);
3085 
3086  COPY_SCALAR_FIELD(subtype);
3088  COPY_NODE_FIELD(newowner);
3089  COPY_NODE_FIELD(def);
3090  COPY_SCALAR_FIELD(behavior);
3091  COPY_SCALAR_FIELD(missing_ok);
3092 
3093  return newnode;
3094 }
#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 3928 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3929 {
3931 
3932  COPY_STRING_FIELD(orig_tablespacename);
3933  COPY_SCALAR_FIELD(objtype);
3934  COPY_NODE_FIELD(roles);
3935  COPY_STRING_FIELD(new_tablespacename);
3936  COPY_SCALAR_FIELD(nowait);
3937 
3938  return newnode;
3939 }
#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 3916 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3917 {
3919 
3920  COPY_STRING_FIELD(tablespacename);
3922  COPY_SCALAR_FIELD(isReset);
3923 
3924  return newnode;
3925 }
#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 3069 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 4373 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4374 {
4376 
4377  COPY_SCALAR_FIELD(kind);
4378  COPY_NODE_FIELD(cfgname);
4379  COPY_NODE_FIELD(tokentype);
4380  COPY_NODE_FIELD(dicts);
4381  COPY_SCALAR_FIELD(override);
4382  COPY_SCALAR_FIELD(replace);
4383  COPY_SCALAR_FIELD(missing_ok);
4384 
4385  return newnode;
4386 }
#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 4362 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

4363 {
4365 
4366  COPY_NODE_FIELD(dictname);
4368 
4369  return newnode;
4370 }
#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 4043 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, makeNode, and user.

Referenced by copyObjectImpl().

4044 {
4046 
4048  COPY_STRING_FIELD(servername);
4050 
4051  return newnode;
4052 }
#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 231 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 2237 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2238 {
2239  AppendRelInfo *newnode = makeNode(AppendRelInfo);
2240 
2241  COPY_SCALAR_FIELD(parent_relid);
2242  COPY_SCALAR_FIELD(child_relid);
2243  COPY_SCALAR_FIELD(parent_reltype);
2244  COPY_SCALAR_FIELD(child_reltype);
2245  COPY_NODE_FIELD(translated_vars);
2246  COPY_SCALAR_FIELD(parent_reloid);
2247 
2248  return newnode;
2249 }
#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 2572 of file copyfuncs.c.

References makeNode.

Referenced by copyObjectImpl().

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

Definition at line 308 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 543 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObjectImpl().

544 {
546 
547  /*
548  * copy node superclass fields
549  */
550  CopyScanFields((const Scan *) from, (Scan *) newnode);
551 
552  /*
553  * copy remainder of node
554  */
555  COPY_NODE_FIELD(bitmapqualorig);
556 
557  return newnode;
558 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:403
#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 519 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

520 {
522 
523  /*
524  * copy node superclass fields
525  */
526  CopyScanFields((const Scan *) from, (Scan *) newnode);
527 
528  /*
529  * copy remainder of node
530  */
531  COPY_SCALAR_FIELD(indexid);
532  COPY_SCALAR_FIELD(isshared);
533  COPY_NODE_FIELD(indexqual);
534  COPY_NODE_FIELD(indexqualorig);
535 
536  return newnode;
537 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:403
#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 329 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

References COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3201 {
3203 
3204  COPY_STRING_FIELD(portalname);
3205 
3206  return newnode;
3207 }
#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 3210 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3211 {
3212  ClusterStmt *newnode = makeNode(ClusterStmt);
3213 
3214  COPY_NODE_FIELD(relation);
3215  COPY_STRING_FIELD(indexname);
3217 
3218  return newnode;
3219 }
#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 2772 of file copyfuncs.c.

References arg, COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2773 {
2774  CollateClause *newnode = makeNode(CollateClause);
2775 
2777  COPY_NODE_FIELD(collname);
2778  COPY_LOCATION_FIELD(location);
2779 
2780  return newnode;
2781 }
#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 2800 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2501 {
2502  ColumnRef *newnode = makeNode(ColumnRef);
2503 
2504  COPY_NODE_FIELD(fields);
2505  COPY_LOCATION_FIELD(location);
2506 
2507  return newnode;
2508 }
#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 3322 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3323 {
3324  CommentStmt *newnode = makeNode(CommentStmt);
3325 
3326  COPY_SCALAR_FIELD(objtype);
3327  COPY_NODE_FIELD(object);
3328  COPY_STRING_FIELD(comment);
3329 
3330  return newnode;
3331 }
#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 2467 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2468 {
2470 
2471  COPY_STRING_FIELD(ctename);
2472  COPY_NODE_FIELD(aliascolnames);
2473  COPY_NODE_FIELD(ctequery);
2474  COPY_LOCATION_FIELD(location);
2475  COPY_SCALAR_FIELD(cterecursive);
2476  COPY_SCALAR_FIELD(cterefcount);
2477  COPY_NODE_FIELD(ctecolnames);
2478  COPY_NODE_FIELD(ctecoltypes);
2479  COPY_NODE_FIELD(ctecoltypmods);
2480  COPY_NODE_FIELD(ctecolcollations);
2481 
2482  return newnode;
2483 }
#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 3578 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3579 {
3581 
3582  COPY_NODE_FIELD(typevar);
3583  COPY_NODE_FIELD(coldeflist);
3584 
3585  return newnode;
3586 }
#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 2825 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4243 {
4245 
4246  COPY_NODE_FIELD(constraints);
4247  COPY_SCALAR_FIELD(deferred);
4248 
4249  return newnode;
4250 }
#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 3222 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3223 {
3224  CopyStmt *newnode = makeNode(CopyStmt);
3225 
3226  COPY_NODE_FIELD(relation);
3227  COPY_NODE_FIELD(query);
3228  COPY_NODE_FIELD(attlist);
3229  COPY_SCALAR_FIELD(is_from);
3230  COPY_SCALAR_FIELD(is_program);
3233 
3234  return newnode;
3235 }
#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:90
static CreateAmStmt* _copyCreateAmStmt ( const CreateAmStmt from)
static

Definition at line 4109 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4110 {
4111  CreateAmStmt *newnode = makeNode(CreateAmStmt);
4112 
4113  COPY_STRING_FIELD(amname);
4114  COPY_NODE_FIELD(handler_name);
4115  COPY_SCALAR_FIELD(amtype);
4116 
4117  return newnode;
4118 }
#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 4293 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4294 {
4296 
4297  COPY_NODE_FIELD(sourcetype);
4298  COPY_NODE_FIELD(targettype);
4299  COPY_NODE_FIELD(func);
4300  COPY_SCALAR_FIELD(context);
4301  COPY_SCALAR_FIELD(inout);
4302 
4303  return newnode;
4304 }
#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 4279 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4280 {
4282 
4283  COPY_NODE_FIELD(conversion_name);
4284  COPY_STRING_FIELD(for_encoding_name);
4285  COPY_STRING_FIELD(to_encoding_name);
4286  COPY_NODE_FIELD(func_name);
4287  COPY_SCALAR_FIELD(def);
4288 
4289  return newnode;
4290 }
#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 3718 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObjectImpl().

3719 {
3720  CreatedbStmt *newnode = makeNode(CreatedbStmt);
3721 
3724 
3725  return newnode;
3726 }
#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:39
static CreateDomainStmt* _copyCreateDomainStmt ( const CreateDomainStmt from)
static

Definition at line 3651 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3652 {
3654 
3655  COPY_NODE_FIELD(domainname);
3656  COPY_NODE_FIELD(typeName);
3657  COPY_NODE_FIELD(collClause);
3658  COPY_NODE_FIELD(constraints);
3659 
3660  return newnode;
3661 }
#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 3589 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3590 {
3592 
3593  COPY_NODE_FIELD(typeName);
3594  COPY_NODE_FIELD(vals);
3595 
3596  return newnode;
3597 }
#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 4144 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4145 {
4147 
4148  COPY_STRING_FIELD(trigname);
4149  COPY_STRING_FIELD(eventname);
4150  COPY_NODE_FIELD(whenclause);
4151  COPY_NODE_FIELD(funcname);
4152 
4153  return newnode;
4154 }
#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 3942 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3943 {
3945 
3946  COPY_STRING_FIELD(extname);
3947  COPY_SCALAR_FIELD(if_not_exists);
3949 
3950  return newnode;
3951 }
#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 3978 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3979 {
3980  CreateFdwStmt *newnode = makeNode(CreateFdwStmt);
3981 
3982  COPY_STRING_FIELD(fdwname);
3983  COPY_NODE_FIELD(func_options);
3985 
3986  return newnode;
3987 }
#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 4002 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4003 {
4005 
4006  COPY_STRING_FIELD(servername);
4007  COPY_STRING_FIELD(servertype);
4008  COPY_STRING_FIELD(version);
4009  COPY_STRING_FIELD(fdwname);
4010  COPY_SCALAR_FIELD(if_not_exists);
4012 
4013  return newnode;
4014 }
#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 4067 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4068 {
4070 
4071  CopyCreateStmtFields((const CreateStmt *) from, (CreateStmt *) newnode);
4072 
4073  COPY_STRING_FIELD(servername);
4075 
4076  return newnode;
4077 }
static void CopyCreateStmtFields(const CreateStmt *from, CreateStmt *newnode)
Definition: copyfuncs.c:3244
#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 3402 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3403 {
3405 
3406  COPY_SCALAR_FIELD(replace);
3407  COPY_NODE_FIELD(funcname);
3408  COPY_NODE_FIELD(parameters);
3409  COPY_NODE_FIELD(returnType);
3411  COPY_NODE_FIELD(withClause);
3412 
3413  return newnode;
3414 }
#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 3679 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, makeNode, and name.

Referenced by copyObjectImpl().

3680 {
3682 
3683  COPY_SCALAR_FIELD(itemtype);
3685  COPY_SCALAR_FIELD(number);
3686  COPY_NODE_FIELD(order_family);
3687  COPY_NODE_FIELD(class_args);
3688  COPY_NODE_FIELD(storedtype);
3689 
3690  return newnode;
3691 }
#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 3664 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3665 {
3667 
3668  COPY_NODE_FIELD(opclassname);
3669  COPY_NODE_FIELD(opfamilyname);
3670  COPY_STRING_FIELD(amname);
3671  COPY_NODE_FIELD(datatype);
3672  COPY_NODE_FIELD(items);
3673  COPY_SCALAR_FIELD(isDefault);
3674 
3675  return newnode;
3676 }
#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 3694 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3695 {
3697 
3698  COPY_NODE_FIELD(opfamilyname);
3699  COPY_STRING_FIELD(amname);
3700 
3701  return newnode;
3702 }
#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 4168 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4169 {
4171 
4172  COPY_SCALAR_FIELD(replace);
4173  COPY_STRING_FIELD(plname);
4174  COPY_NODE_FIELD(plhandler);
4175  COPY_NODE_FIELD(plinline);
4176  COPY_NODE_FIELD(plvalidator);
4177  COPY_SCALAR_FIELD(pltrusted);
4178 
4179  return newnode;
4180 }
#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 4389 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4390 {
4392 
4393  COPY_STRING_FIELD(policy_name);
4394  COPY_NODE_FIELD(table);
4395  COPY_STRING_FIELD(cmd_name);
4396  COPY_SCALAR_FIELD(permissive);
4397  COPY_NODE_FIELD(roles);
4398  COPY_NODE_FIELD(qual);
4399  COPY_NODE_FIELD(with_check);
4400 
4401  return newnode;
4402 }
#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 4482 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4483 {
4485 
4486  COPY_STRING_FIELD(pubname);
4488  COPY_NODE_FIELD(tables);
4489  COPY_SCALAR_FIELD(for_all_tables);
4490 
4491  return newnode;
4492 }
#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 3600 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3601 {
3603 
3604  COPY_NODE_FIELD(typeName);
3605  COPY_NODE_FIELD(params);
3606 
3607  return newnode;
3608 }
#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 4183 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4184 {
4186 
4187  COPY_SCALAR_FIELD(stmt_type);
4188  COPY_STRING_FIELD(role);
4190 
4191  return newnode;
4192 }
#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 4266 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4267 {
4269 
4270  COPY_STRING_FIELD(schemaname);
4271  COPY_NODE_FIELD(authrole);
4272  COPY_NODE_FIELD(schemaElts);
4273  COPY_SCALAR_FIELD(if_not_exists);
4274 
4275  return newnode;
4276 }
#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 3832 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3833 {
3834  CreateSeqStmt *newnode = makeNode(CreateSeqStmt);
3835 
3836  COPY_NODE_FIELD(sequence);
3838  COPY_SCALAR_FIELD(ownerId);
3839  COPY_SCALAR_FIELD(for_identity);
3840  COPY_SCALAR_FIELD(if_not_exists);
3841 
3842  return newnode;
3843 }
#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 3388 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3389 {
3391 
3392  COPY_NODE_FIELD(defnames);
3393  COPY_NODE_FIELD(stat_types);
3394  COPY_NODE_FIELD(exprs);
3395  COPY_NODE_FIELD(relations);
3396  COPY_SCALAR_FIELD(if_not_exists);
3397 
3398  return newnode;
3399 }
#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 3260 of file copyfuncs.c.

References CopyCreateStmtFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 4509 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4510 {
4512 
4513  COPY_STRING_FIELD(subname);
4514  COPY_STRING_FIELD(conninfo);
4515  COPY_NODE_FIELD(publication);
4517 
4518  return newnode;
4519 }
#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 3785 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3786 {
3788 
3789  COPY_NODE_FIELD(query);
3790  COPY_NODE_FIELD(into);
3791  COPY_SCALAR_FIELD(relkind);
3792  COPY_SCALAR_FIELD(is_select_into);
3793  COPY_SCALAR_FIELD(if_not_exists);
3794 
3795  return newnode;
3796 }
#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 3892 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3893 {
3895 
3896  COPY_STRING_FIELD(tablespacename);
3897  COPY_NODE_FIELD(owner);
3898  COPY_STRING_FIELD(location);
3900 
3901  return newnode;
3902 }
#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 4095 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4096 {
4098 
4099  COPY_SCALAR_FIELD(replace);
4100  COPY_NODE_FIELD(type_name);
4101  COPY_STRING_FIELD(lang);
4102  COPY_NODE_FIELD(fromsql);
4103  COPY_NODE_FIELD(tosql);
4104 
4105  return newnode;
4106 }
#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 4121 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4122 {
4124 
4125  COPY_STRING_FIELD(trigname);
4126  COPY_NODE_FIELD(relation);
4127  COPY_NODE_FIELD(funcname);
4129  COPY_SCALAR_FIELD(row);
4130  COPY_SCALAR_FIELD(timing);
4131  COPY_SCALAR_FIELD(events);
4132  COPY_NODE_FIELD(columns);
4133  COPY_NODE_FIELD(whenClause);
4134  COPY_SCALAR_FIELD(isconstraint);
4135  COPY_NODE_FIELD(transitionRels);
4136  COPY_SCALAR_FIELD(deferrable);
4137  COPY_SCALAR_FIELD(initdeferred);
4138  COPY_NODE_FIELD(constrrel);
4139 
4140  return newnode;
4141 }
#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 4030 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4031 {
4033 
4035  COPY_STRING_FIELD(servername);
4036  COPY_SCALAR_FIELD(if_not_exists);
4038 
4039  return newnode;
4040 }
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
#define COPY_NODE_FIELD(fldname)
Definition: copyfuncs.c:45
#define COPY_STRING_FIELD(fldname)
Definition: copyfuncs.c:53
#define makeNode(_type_)
Definition: nodes.h:557
static char * user
Definition: pg_regress.c:92
static CteScan* _copyCteScan ( const CteScan from)
static

Definition at line 670 of file copyfuncs.c.

References COPY_SCALAR_FIELD, CopyScanFields(), and makeNode.

Referenced by copyObjectImpl().

671 {
672  CteScan *newnode = makeNode(CteScan);
673 
674  /*
675  * copy node superclass fields
676  */
677  CopyScanFields((const Scan *) from, (Scan *) newnode);
678 
679  /*
680  * copy remainder of node
681  */
682  COPY_SCALAR_FIELD(ctePlanId);
683  COPY_SCALAR_FIELD(cteParam);
684 
685  return newnode;
686 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:403
#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 762 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

763 {
764  CustomScan *newnode = makeNode(CustomScan);
765 
766  /*
767  * copy node superclass fields
768  */
769  CopyScanFields((const Scan *) from, (Scan *) newnode);
770 
771  /*
772  * copy remainder of node
773  */
774  COPY_SCALAR_FIELD(flags);
775  COPY_NODE_FIELD(custom_plans);
776  COPY_NODE_FIELD(custom_exprs);
777  COPY_NODE_FIELD(custom_private);
778  COPY_NODE_FIELD(custom_scan_tlist);
779  COPY_BITMAPSET_FIELD(custom_relids);
780 
781  /*
782  * NOTE: The method field of CustomScan is required to be a pointer to a
783  * static table of callback functions. So we don't copy the table itself,
784  * just reference the original one.
785  */
786  COPY_SCALAR_FIELD(methods);
787 
788  return newnode;
789 }
#define COPY_BITMAPSET_FIELD(fldname)
Definition: copyfuncs.c:49
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:403
#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 4330 of file copyfuncs.c.

References COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObjectImpl().

4331 {
4333 
4335 
4336  return newnode;
4337 }
#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 3188 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3189 {
3191 
3192  COPY_STRING_FIELD(portalname);
3194  COPY_NODE_FIELD(query);
3195 
3196  return newnode;
3197 }
#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 2860 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2861 {
2862  DefElem *newnode = makeNode(DefElem);
2863 
2864  COPY_STRING_FIELD(defnamespace);
2865  COPY_STRING_FIELD(defname);
2867  COPY_SCALAR_FIELD(defaction);
2868  COPY_LOCATION_FIELD(location);
2869 
2870  return newnode;
2871 }
#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 3281 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3282 {
3283  DefineStmt *newnode = makeNode(DefineStmt);
3284 
3285  COPY_SCALAR_FIELD(kind);
3286  COPY_SCALAR_FIELD(oldstyle);
3287  COPY_NODE_FIELD(defnames);
3289  COPY_NODE_FIELD(definition);
3290  COPY_SCALAR_FIELD(if_not_exists);
3291 
3292  return newnode;
3293 }
#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 2996 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

2997 {
2998  DeleteStmt *newnode = makeNode(DeleteStmt);
2999 
3000  COPY_NODE_FIELD(relation);
3001  COPY_NODE_FIELD(usingClause);
3002  COPY_NODE_FIELD(whereClause);
3003  COPY_NODE_FIELD(returningList);
3004  COPY_NODE_FIELD(withClause);
3005 
3006  return newnode;
3007 }
#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 3882 of file copyfuncs.c.

References COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3883 {
3884  DiscardStmt *newnode = makeNode(DiscardStmt);
3885 
3886  COPY_SCALAR_FIELD(target);
3887 
3888  return newnode;
3889 }
#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 3441 of file copyfuncs.c.

References generate_unaccent_rules::args, COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3442 {
3443  DoStmt *newnode = makeNode(DoStmt);
3444 
3446 
3447  return newnode;
3448 }
#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 3751 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, dbname, and makeNode.

Referenced by copyObjectImpl().

3752 {
3753  DropdbStmt *newnode = makeNode(DropdbStmt);
3754 
3756  COPY_SCALAR_FIELD(missing_ok);
3757 
3758  return newnode;
3759 }
#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:39
static DropOwnedStmt* _copyDropOwnedStmt ( const DropOwnedStmt from)
static

Definition at line 4340 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4341 {
4342  DropOwnedStmt *newnode = makeNode(DropOwnedStmt);
4343 
4344  COPY_NODE_FIELD(roles);
4345  COPY_SCALAR_FIELD(behavior);
4346 
4347  return newnode;
4348 }
#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 4219 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4220 {
4221  DropRoleStmt *newnode = makeNode(DropRoleStmt);
4222 
4223  COPY_NODE_FIELD(roles);
4224  COPY_SCALAR_FIELD(missing_ok);
4225 
4226  return newnode;
4227 }
#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 3296 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3297 {
3298  DropStmt *newnode = makeNode(DropStmt);
3299 
3300  COPY_NODE_FIELD(objects);
3301  COPY_SCALAR_FIELD(removeType);
3302  COPY_SCALAR_FIELD(behavior);
3303  COPY_SCALAR_FIELD(missing_ok);
3304  COPY_SCALAR_FIELD(concurrent);
3305 
3306  return newnode;
3307 }
#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 4536 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4537 {
4539 
4540  COPY_STRING_FIELD(subname);
4541  COPY_SCALAR_FIELD(missing_ok);
4542  COPY_SCALAR_FIELD(behavior);
4543 
4544  return newnode;
4545 }
#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 3905 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3906 {
3908 
3909  COPY_STRING_FIELD(tablespacename);
3910  COPY_SCALAR_FIELD(missing_ok);
3911 
3912  return newnode;
3913 }
#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 4055 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4056 {
4058 
4060  COPY_STRING_FIELD(servername);
4061  COPY_SCALAR_FIELD(missing_ok);
4062 
4063  return newnode;
4064 }
#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 4319 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_STRING_FIELD, makeNode, and name.

Referenced by copyObjectImpl().

4320 {
4321  ExecuteStmt *newnode = makeNode(ExecuteStmt);
4322 
4324  COPY_NODE_FIELD(params);
4325 
4326  return newnode;
4327 }
#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 3774 of file copyfuncs.c.

References COPY_NODE_FIELD, and makeNode.

Referenced by copyObjectImpl().

3775 {
3776  ExplainStmt *newnode = makeNode(ExplainStmt);
3777 
3778  COPY_NODE_FIELD(query);
3780 
3781  return newnode;
3782 }
#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 4594 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4595 {
4596  ExtensibleNode *newnode;
4597  const ExtensibleNodeMethods *methods;
4598 
4599  methods = GetExtensibleNodeMethods(from->extnodename, false);
4600  newnode = (ExtensibleNode *) newNode(methods->node_size,
4602  COPY_STRING_FIELD(extnodename);
4603 
4604  /* copy the private fields */
4605  methods->nodeCopy(newnode, from);
4606 
4607  return newnode;
4608 }
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 3347 of file copyfuncs.c.

References COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3348 {
3349  FetchStmt *newnode = makeNode(FetchStmt);
3350 
3351  COPY_SCALAR_FIELD(direction);
3352  COPY_SCALAR_FIELD(howMany);
3353  COPY_STRING_FIELD(portalname);
3354  COPY_SCALAR_FIELD(ismove);
3355 
3356  return newnode;
3357 }
#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 4645 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4646 {
4648 
4649  COPY_SCALAR_FIELD(conrelid);
4650  COPY_SCALAR_FIELD(confrelid);
4651  COPY_SCALAR_FIELD(nkeys);
4652  /* COPY_SCALAR_FIELD might work for these, but let's not assume that */
4653  memcpy(newnode->conkey, from->conkey, sizeof(newnode->conkey));
4654  memcpy(newnode->confkey, from->confkey, sizeof(newnode->confkey));
4655  memcpy(newnode->conpfeqop, from->conpfeqop, sizeof(newnode->conpfeqop));
4656 
4657  return newnode;
4658 }
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 734 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

735 {
736  ForeignScan *newnode = makeNode(ForeignScan);
737 
738  /*
739  * copy node superclass fields
740  */
741  CopyScanFields((const Scan *) from, (Scan *) newnode);
742 
743  /*
744  * copy remainder of node
745  */
746  COPY_SCALAR_FIELD(operation);
747  COPY_SCALAR_FIELD(fs_server);
748  COPY_NODE_FIELD(fdw_exprs);
749  COPY_NODE_FIELD(fdw_private);
750  COPY_NODE_FIELD(fdw_scan_tlist);
751  COPY_NODE_FIELD(fdw_recheck_quals);
752  COPY_BITMAPSET_FIELD(fs_relids);
753  COPY_SCALAR_FIELD(fsSystemCol);
754 
755  return newnode;
756 }
#define COPY_BITMAPSET_FIELD(fldname)
Definition: copyfuncs.c:49
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:403
#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 2553 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2554 {
2555  FuncCall *newnode = makeNode(FuncCall);
2556 
2557  COPY_NODE_FIELD(funcname);
2559  COPY_NODE_FIELD(agg_order);
2560  COPY_NODE_FIELD(agg_filter);
2561  COPY_SCALAR_FIELD(agg_within_group);
2562  COPY_SCALAR_FIELD(agg_star);
2563  COPY_SCALAR_FIELD(agg_distinct);
2564  COPY_SCALAR_FIELD(func_variadic);
2565  COPY_NODE_FIELD(over);
2566  COPY_LOCATION_FIELD(location);
2567 
2568  return newnode;
2569 }
#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 3417 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

3418 {
3420 
3422  COPY_NODE_FIELD(argType);
3423  COPY_SCALAR_FIELD(mode);
3424  COPY_NODE_FIELD(defexpr);
3425 
3426  return newnode;
3427 }
#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 606 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

607 {
608  FunctionScan *newnode = makeNode(FunctionScan);
609 
610  /*
611  * copy node superclass fields
612  */
613  CopyScanFields((const Scan *) from, (Scan *) newnode);
614 
615  /*
616  * copy remainder of node
617  */
619  COPY_SCALAR_FIELD(funcordinality);
620 
621  return newnode;
622 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:403
#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 351 of file copyfuncs.c.

References COPY_SCALAR_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 374 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 3162 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3163 {
3164  GrantRoleStmt *newnode = makeNode(GrantRoleStmt);
3165 
3166  COPY_NODE_FIELD(granted_roles);
3167  COPY_NODE_FIELD(grantee_roles);
3168  COPY_SCALAR_FIELD(is_grant);
3169  COPY_SCALAR_FIELD(admin_opt);
3170  COPY_NODE_FIELD(grantor);
3171  COPY_SCALAR_FIELD(behavior);
3172 
3173  return newnode;
3174 }
#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 3122 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

3123 {
3124  GrantStmt *newnode = makeNode(GrantStmt);
3125 
3126  COPY_SCALAR_FIELD(is_grant);
3127  COPY_SCALAR_FIELD(targtype);
3128  COPY_SCALAR_FIELD(objtype);
3129  COPY_NODE_FIELD(objects);
3130  COPY_NODE_FIELD(privileges);
3131  COPY_NODE_FIELD(grantees);
3132  COPY_SCALAR_FIELD(grant_option);
3133  COPY_SCALAR_FIELD(behavior);
3134 
3135  return newnode;
3136 }
#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 944 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

945 {
946  Group *newnode = makeNode(Group);
947 
948  CopyPlanFields((const Plan *) from, (Plan *) newnode);
949 
950  COPY_SCALAR_FIELD(numCols);
951  COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
952  COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
953 
954  return newnode;
955 }
unsigned int Oid
Definition: postgres_ext.h:31
#define COPY_POINTER_FIELD(fldname, sz)
Definition: copyfuncs.c:57
#define COPY_SCALAR_FIELD(fldname)
Definition: copyfuncs.c:41
static void CopyPlanFields(const Plan *from, Plan *newnode)
Definition: copyfuncs.c:115
int numCols
Definition: plannodes.h:761
#define makeNode(_type_)
Definition: nodes.h: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 2385 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2386 {
2387  GroupingSet *newnode = makeNode(GroupingSet);
2388 
2389  COPY_SCALAR_FIELD(kind);
2390  COPY_NODE_FIELD(content);
2391  COPY_LOCATION_FIELD(location);
2392 
2393  return newnode;
2394 }
#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 1040 of file copyfuncs.c.

References COPY_SCALAR_FIELD, CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

1041 {
1042  Hash *newnode = makeNode(Hash);
1043 
1044  /*
1045  * copy node superclass fields
1046  */
1047  CopyPlanFields((const Plan *) from, (Plan *) newnode);
1048 
1049  /*
1050  * copy remainder of node
1051  */
1052  COPY_SCALAR_FIELD(skewTable);
1053  COPY_SCALAR_FIELD(skewColumn);
1054  COPY_SCALAR_FIELD(skewInherit);
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:115
#define makeNode(_type_)
Definition: nodes.h:557
static HashJoin* _copyHashJoin ( const HashJoin from)
static

Definition at line 882 of file copyfuncs.c.

References COPY_NODE_FIELD, CopyJoinFields(), and makeNode.

Referenced by copyObjectImpl().

883 {
884  HashJoin *newnode = makeNode(HashJoin);
885 
886  /*
887  * copy node superclass fields
888  */
889  CopyJoinFields((const Join *) from, (Join *) newnode);
890 
891  /*
892  * copy remainder of node
893  */
894  COPY_NODE_FIELD(hashclauses);
895 
896  return newnode;
897 }
static void CopyJoinFields(const Join *from, Join *newnode)
Definition: copyfuncs.c:798
#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 4080 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

4081 {
4083 
4084  COPY_STRING_FIELD(server_name);
4085  COPY_STRING_FIELD(remote_schema);
4086  COPY_STRING_FIELD(local_schema);
4087  COPY_SCALAR_FIELD(list_type);
4088  COPY_NODE_FIELD(table_list);
4090 
4091  return newnode;
4092 }
#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 2784 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

2785 {
2786  IndexElem *newnode = makeNode(IndexElem);
2787 
2789  COPY_NODE_FIELD(expr);
2790  COPY_STRING_FIELD(indexcolname);
2791  COPY_NODE_FIELD(collation);
2792  COPY_NODE_FIELD(opclass);
2793  COPY_SCALAR_FIELD(ordering);
2794  COPY_SCALAR_FIELD(nulls_ordering);
2795 
2796  return newnode;
2797 }
#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 494 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

495 {
497 
498  /*
499  * copy node superclass fields
500  */
501  CopyScanFields((const Scan *) from, (Scan *) newnode);
502 
503  /*
504  * copy remainder of node
505  */
506  COPY_SCALAR_FIELD(indexid);
507  COPY_NODE_FIELD(indexqual);
508  COPY_NODE_FIELD(indexorderby);
509  COPY_NODE_FIELD(indextlist);
510  COPY_SCALAR_FIELD(indexorderdir);
511 
512  return newnode;
513 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:403
#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 467 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

468 {
469  IndexScan *newnode = makeNode(IndexScan);
470 
471  /*
472  * copy node superclass fields
473  */
474  CopyScanFields((const Scan *) from, (Scan *) newnode);
475 
476  /*
477  * copy remainder of node
478  */
479  COPY_SCALAR_FIELD(indexid);
480  COPY_NODE_FIELD(indexqual);
481  COPY_NODE_FIELD(indexqualorig);
482  COPY_NODE_FIELD(indexorderby);
483  COPY_NODE_FIELD(indexorderbyorig);
484  COPY_NODE_FIELD(indexorderbyops);
485  COPY_SCALAR_FIELD(indexorderdir);
486 
487  return newnode;
488 }
static void CopyScanFields(const Scan *from, Scan *newnode)
Definition: copyfuncs.c:403
#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 3360 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3361 {
3362  IndexStmt *newnode = makeNode(IndexStmt);
3363 
3364  COPY_STRING_FIELD(idxname);
3365  COPY_NODE_FIELD(relation);
3366  COPY_STRING_FIELD(accessMethod);
3367  COPY_STRING_FIELD(tableSpace);
3368  COPY_NODE_FIELD(indexParams);
3370  COPY_NODE_FIELD(whereClause);
3371  COPY_NODE_FIELD(excludeOpNames);
3372  COPY_STRING_FIELD(idxcomment);
3373  COPY_SCALAR_FIELD(indexOid);
3374  COPY_SCALAR_FIELD(oldNode);
3375  COPY_SCALAR_FIELD(unique);
3376  COPY_SCALAR_FIELD(primary);
3377  COPY_SCALAR_FIELD(isconstraint);
3378  COPY_SCALAR_FIELD(deferrable);
3379  COPY_SCALAR_FIELD(initdeferred);
3380  COPY_SCALAR_FIELD(transformed);
3381  COPY_SCALAR_FIELD(concurrent);
3382  COPY_SCALAR_FIELD(if_not_exists);
3383 
3384  return newnode;
3385 }
#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 2440 of file copyfuncs.c.

References COPY_LOCATION_FIELD, COPY_NODE_FIELD, COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

2441 {
2442  InferClause *newnode = makeNode(InferClause);
2443 
2444  COPY_NODE_FIELD(indexElems);
2445  COPY_NODE_FIELD(whereClause);
2446  COPY_STRING_FIELD(conname);
2447  COPY_LOCATION_FIELD(location);
2448 
2449  return newnode;
2450 }
#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 2980 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2981 {
2982  InsertStmt *newnode = makeNode(InsertStmt);
2983 
2984  COPY_NODE_FIELD(relation);
2985  COPY_NODE_FIELD(cols);
2986  COPY_NODE_FIELD(selectStmt);
2987  COPY_NODE_FIELD(onConflictClause);
2988  COPY_NODE_FIELD(returningList);
2989  COPY_NODE_FIELD(withClause);
2990  COPY_SCALAR_FIELD(override);
2991 
2992  return newnode;
2993 }
#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 812 of file copyfuncs.c.

References CopyJoinFields(), and makeNode.

Referenced by copyObjectImpl().

813 {
814  Join *newnode = makeNode(Join);
815 
816  /*
817  * copy node superclass fields
818  */
819  CopyJoinFields(from, newnode);
820 
821  return newnode;
822 }
static void CopyJoinFields(const Join *from, Join *newnode)
Definition: copyfuncs.c:798
#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:115
#define makeNode(_type_)
Definition: nodes.h:557
static List* _copyList ( const List from)
static

Definition at line 4562 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

4563 {
4564  List *new;
4565  ListCell *curr_old;
4566  ListCell *prev_new;
4567 
4568  Assert(list_length(from) >= 1);
4569 
4570  new = makeNode(List);
4571  new->length = from->length;
4572 
4573  COPY_NODE_CELL(new->head, from->head);
4574  prev_new = new->head;
4575  curr_old = lnext(from->head);
4576 
4577  while (curr_old)
4578  {
4579  COPY_NODE_CELL(prev_new->next, curr_old);
4580  prev_new = prev_new->next;
4581  curr_old = curr_old->next;
4582  }
4583  prev_new->next = NULL;
4584  new->tail = prev_new;
4585 
4586  return new;
4587 }
#define lnext(lc)
Definition: pg_list.h:105
#define COPY_NODE_CELL(new, old)
Definition: copyfuncs.c:4557
#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:676
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 3546 of file copyfuncs.c.

References COPY_STRING_FIELD, and makeNode.

Referenced by copyObjectImpl().

3547 {
3548  ListenStmt *newnode = makeNode(ListenStmt);
3549 
3550  COPY_STRING_FIELD(conditionname);
3551 
3552  return newnode;
3553 }
#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 3641 of file copyfuncs.c.

References COPY_STRING_FIELD, filename, and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 2874 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2875 {
2876  LockingClause *newnode = makeNode(LockingClause);
2877 
2878  COPY_NODE_FIELD(lockedRels);
2879  COPY_SCALAR_FIELD(strength);
2880  COPY_SCALAR_FIELD(waitPolicy);
2881 
2882  return newnode;
2883 }
#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:115
#define makeNode(_type_)
Definition: nodes.h:557
static LockStmt* _copyLockStmt ( const LockStmt from)
static

Definition at line 4230 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

4231 {
4232  LockStmt *newnode = makeNode(LockStmt);
4233 
4234  COPY_NODE_FIELD(relations);
4235  COPY_SCALAR_FIELD(mode);
4236  COPY_SCALAR_FIELD(nowait);
4237 
4238  return newnode;
4239 }
#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 904 of file copyfuncs.c.

References CopyPlanFields(), and makeNode.

Referenced by copyObjectImpl().

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

Definition at line 253 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

Definition at line 851 of file copyfuncs.c.

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

Referenced by copyObjectImpl().

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

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

Referenced by copyObjectImpl().

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

Definition at line 2627 of file copyfuncs.c.

References COPY_NODE_FIELD, COPY_SCALAR_FIELD, and makeNode.

Referenced by copyObjectImpl().

2628 {
2630 
2631  COPY_NODE_FIELD(source);
2632  COPY_SCALAR_FIELD(colno);
2633  COPY_SCALAR_FIELD(ncolumns);
2634 
2635  return newnode;
2636 }
#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