* _copyPlannedStmt
*/
static PlannedStmt *
-_copyPlannedStmt(PlannedStmt *from)
+_copyPlannedStmt(const PlannedStmt *from)
{
PlannedStmt *newnode = makeNode(PlannedStmt);
* all the copy functions for classes which inherit from Plan.
*/
static void
-CopyPlanFields(Plan *from, Plan *newnode)
+CopyPlanFields(const Plan *from, Plan *newnode)
{
COPY_SCALAR_FIELD(startup_cost);
COPY_SCALAR_FIELD(total_cost);
* _copyPlan
*/
static Plan *
-_copyPlan(Plan *from)
+_copyPlan(const Plan *from)
{
Plan *newnode = makeNode(Plan);
* _copyResult
*/
static Result *
-_copyResult(Result *from)
+_copyResult(const Result *from)
{
Result *newnode = makeNode(Result);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
* _copyModifyTable
*/
static ModifyTable *
-_copyModifyTable(ModifyTable *from)
+_copyModifyTable(const ModifyTable *from)
{
ModifyTable *newnode = makeNode(ModifyTable);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
* _copyAppend
*/
static Append *
-_copyAppend(Append *from)
+_copyAppend(const Append *from)
{
Append *newnode = makeNode(Append);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
* _copyMergeAppend
*/
static MergeAppend *
-_copyMergeAppend(MergeAppend *from)
+_copyMergeAppend(const MergeAppend *from)
{
MergeAppend *newnode = makeNode(MergeAppend);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
* _copyRecursiveUnion
*/
static RecursiveUnion *
-_copyRecursiveUnion(RecursiveUnion *from)
+_copyRecursiveUnion(const RecursiveUnion *from)
{
RecursiveUnion *newnode = makeNode(RecursiveUnion);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
* _copyBitmapAnd
*/
static BitmapAnd *
-_copyBitmapAnd(BitmapAnd *from)
+_copyBitmapAnd(const BitmapAnd *from)
{
BitmapAnd *newnode = makeNode(BitmapAnd);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
* _copyBitmapOr
*/
static BitmapOr *
-_copyBitmapOr(BitmapOr *from)
+_copyBitmapOr(const BitmapOr *from)
{
BitmapOr *newnode = makeNode(BitmapOr);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
* all the copy functions for classes which inherit from Scan.
*/
static void
-CopyScanFields(Scan *from, Scan *newnode)
+CopyScanFields(const Scan *from, Scan *newnode)
{
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
COPY_SCALAR_FIELD(scanrelid);
}
* _copyScan
*/
static Scan *
-_copyScan(Scan *from)
+_copyScan(const Scan *from)
{
Scan *newnode = makeNode(Scan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
return newnode;
}
* _copySeqScan
*/
static SeqScan *
-_copySeqScan(SeqScan *from)
+_copySeqScan(const SeqScan *from)
{
SeqScan *newnode = makeNode(SeqScan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
return newnode;
}
* _copyIndexScan
*/
static IndexScan *
-_copyIndexScan(IndexScan *from)
+_copyIndexScan(const IndexScan *from)
{
IndexScan *newnode = makeNode(IndexScan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
/*
* copy remainder of node
* _copyIndexOnlyScan
*/
static IndexOnlyScan *
-_copyIndexOnlyScan(IndexOnlyScan *from)
+_copyIndexOnlyScan(const IndexOnlyScan *from)
{
IndexOnlyScan *newnode = makeNode(IndexOnlyScan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
/*
* copy remainder of node
* _copyBitmapIndexScan
*/
static BitmapIndexScan *
-_copyBitmapIndexScan(BitmapIndexScan *from)
+_copyBitmapIndexScan(const BitmapIndexScan *from)
{
BitmapIndexScan *newnode = makeNode(BitmapIndexScan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
/*
* copy remainder of node
* _copyBitmapHeapScan
*/
static BitmapHeapScan *
-_copyBitmapHeapScan(BitmapHeapScan *from)
+_copyBitmapHeapScan(const BitmapHeapScan *from)
{
BitmapHeapScan *newnode = makeNode(BitmapHeapScan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
/*
* copy remainder of node
* _copyTidScan
*/
static TidScan *
-_copyTidScan(TidScan *from)
+_copyTidScan(const TidScan *from)
{
TidScan *newnode = makeNode(TidScan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
/*
* copy remainder of node
* _copySubqueryScan
*/
static SubqueryScan *
-_copySubqueryScan(SubqueryScan *from)
+_copySubqueryScan(const SubqueryScan *from)
{
SubqueryScan *newnode = makeNode(SubqueryScan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
/*
* copy remainder of node
* _copyFunctionScan
*/
static FunctionScan *
-_copyFunctionScan(FunctionScan *from)
+_copyFunctionScan(const FunctionScan *from)
{
FunctionScan *newnode = makeNode(FunctionScan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
/*
* copy remainder of node
* _copyValuesScan
*/
static ValuesScan *
-_copyValuesScan(ValuesScan *from)
+_copyValuesScan(const ValuesScan *from)
{
ValuesScan *newnode = makeNode(ValuesScan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
/*
* copy remainder of node
* _copyCteScan
*/
static CteScan *
-_copyCteScan(CteScan *from)
+_copyCteScan(const CteScan *from)
{
CteScan *newnode = makeNode(CteScan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
/*
* copy remainder of node
* _copyWorkTableScan
*/
static WorkTableScan *
-_copyWorkTableScan(WorkTableScan *from)
+_copyWorkTableScan(const WorkTableScan *from)
{
WorkTableScan *newnode = makeNode(WorkTableScan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
/*
* copy remainder of node
* _copyForeignScan
*/
static ForeignScan *
-_copyForeignScan(ForeignScan *from)
+_copyForeignScan(const ForeignScan *from)
{
ForeignScan *newnode = makeNode(ForeignScan);
/*
* copy node superclass fields
*/
- CopyScanFields((Scan *) from, (Scan *) newnode);
+ CopyScanFields((const Scan *) from, (Scan *) newnode);
/*
* copy remainder of node
* _copyFdwPlan
*/
static FdwPlan *
-_copyFdwPlan(FdwPlan *from)
+_copyFdwPlan(const FdwPlan *from)
{
FdwPlan *newnode = makeNode(FdwPlan);
* all the copy functions for classes which inherit from Join.
*/
static void
-CopyJoinFields(Join *from, Join *newnode)
+CopyJoinFields(const Join *from, Join *newnode)
{
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
COPY_SCALAR_FIELD(jointype);
COPY_NODE_FIELD(joinqual);
* _copyJoin
*/
static Join *
-_copyJoin(Join *from)
+_copyJoin(const Join *from)
{
Join *newnode = makeNode(Join);
* _copyNestLoop
*/
static NestLoop *
-_copyNestLoop(NestLoop *from)
+_copyNestLoop(const NestLoop *from)
{
NestLoop *newnode = makeNode(NestLoop);
/*
* copy node superclass fields
*/
- CopyJoinFields((Join *) from, (Join *) newnode);
+ CopyJoinFields((const Join *) from, (Join *) newnode);
/*
* copy remainder of node
* _copyMergeJoin
*/
static MergeJoin *
-_copyMergeJoin(MergeJoin *from)
+_copyMergeJoin(const MergeJoin *from)
{
MergeJoin *newnode = makeNode(MergeJoin);
int numCols;
/*
* copy node superclass fields
*/
- CopyJoinFields((Join *) from, (Join *) newnode);
+ CopyJoinFields((const Join *) from, (Join *) newnode);
/*
* copy remainder of node
* _copyHashJoin
*/
static HashJoin *
-_copyHashJoin(HashJoin *from)
+_copyHashJoin(const HashJoin *from)
{
HashJoin *newnode = makeNode(HashJoin);
/*
* copy node superclass fields
*/
- CopyJoinFields((Join *) from, (Join *) newnode);
+ CopyJoinFields((const Join *) from, (Join *) newnode);
/*
* copy remainder of node
* _copyMaterial
*/
static Material *
-_copyMaterial(Material *from)
+_copyMaterial(const Material *from)
{
Material *newnode = makeNode(Material);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
return newnode;
}
* _copySort
*/
static Sort *
-_copySort(Sort *from)
+_copySort(const Sort *from)
{
Sort *newnode = makeNode(Sort);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
COPY_SCALAR_FIELD(numCols);
COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
* _copyGroup
*/
static Group *
-_copyGroup(Group *from)
+_copyGroup(const Group *from)
{
Group *newnode = makeNode(Group);
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
COPY_SCALAR_FIELD(numCols);
COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
* _copyAgg
*/
static Agg *
-_copyAgg(Agg *from)
+_copyAgg(const Agg *from)
{
Agg *newnode = makeNode(Agg);
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
COPY_SCALAR_FIELD(aggstrategy);
COPY_SCALAR_FIELD(numCols);
* _copyWindowAgg
*/
static WindowAgg *
-_copyWindowAgg(WindowAgg *from)
+_copyWindowAgg(const WindowAgg *from)
{
WindowAgg *newnode = makeNode(WindowAgg);
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
COPY_SCALAR_FIELD(winref);
COPY_SCALAR_FIELD(partNumCols);
* _copyUnique
*/
static Unique *
-_copyUnique(Unique *from)
+_copyUnique(const Unique *from)
{
Unique *newnode = makeNode(Unique);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
* _copyHash
*/
static Hash *
-_copyHash(Hash *from)
+_copyHash(const Hash *from)
{
Hash *newnode = makeNode(Hash);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
* _copySetOp
*/
static SetOp *
-_copySetOp(SetOp *from)
+_copySetOp(const SetOp *from)
{
SetOp *newnode = makeNode(SetOp);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
* _copyLockRows
*/
static LockRows *
-_copyLockRows(LockRows *from)
+_copyLockRows(const LockRows *from)
{
LockRows *newnode = makeNode(LockRows);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
* _copyLimit
*/
static Limit *
-_copyLimit(Limit *from)
+_copyLimit(const Limit *from)
{
Limit *newnode = makeNode(Limit);
/*
* copy node superclass fields
*/
- CopyPlanFields((Plan *) from, (Plan *) newnode);
+ CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
* _copyNestLoopParam
*/
static NestLoopParam *
-_copyNestLoopParam(NestLoopParam *from)
+_copyNestLoopParam(const NestLoopParam *from)
{
NestLoopParam *newnode = makeNode(NestLoopParam);
* _copyPlanRowMark
*/
static PlanRowMark *
-_copyPlanRowMark(PlanRowMark *from)
+_copyPlanRowMark(const PlanRowMark *from)
{
PlanRowMark *newnode = makeNode(PlanRowMark);
* _copyPlanInvalItem
*/
static PlanInvalItem *
-_copyPlanInvalItem(PlanInvalItem *from)
+_copyPlanInvalItem(const PlanInvalItem *from)
{
PlanInvalItem *newnode = makeNode(PlanInvalItem);
* _copyAlias
*/
static Alias *
-_copyAlias(Alias *from)
+_copyAlias(const Alias *from)
{
Alias *newnode = makeNode(Alias);
* _copyRangeVar
*/
static RangeVar *
-_copyRangeVar(RangeVar *from)
+_copyRangeVar(const RangeVar *from)
{
RangeVar *newnode = makeNode(RangeVar);
* _copyIntoClause
*/
static IntoClause *
-_copyIntoClause(IntoClause *from)
+_copyIntoClause(const IntoClause *from)
{
IntoClause *newnode = makeNode(IntoClause);
* _copyVar
*/
static Var *
-_copyVar(Var *from)
+_copyVar(const Var *from)
{
Var *newnode = makeNode(Var);
* _copyConst
*/
static Const *
-_copyConst(Const *from)
+_copyConst(const Const *from)
{
Const *newnode = makeNode(Const);
* _copyParam
*/
static Param *
-_copyParam(Param *from)
+_copyParam(const Param *from)
{
Param *newnode = makeNode(Param);
* _copyAggref
*/
static Aggref *
-_copyAggref(Aggref *from)
+_copyAggref(const Aggref *from)
{
Aggref *newnode = makeNode(Aggref);
* _copyWindowFunc
*/
static WindowFunc *
-_copyWindowFunc(WindowFunc *from)
+_copyWindowFunc(const WindowFunc *from)
{
WindowFunc *newnode = makeNode(WindowFunc);
* _copyArrayRef
*/
static ArrayRef *
-_copyArrayRef(ArrayRef *from)
+_copyArrayRef(const ArrayRef *from)
{
ArrayRef *newnode = makeNode(ArrayRef);
* _copyFuncExpr
*/
static FuncExpr *
-_copyFuncExpr(FuncExpr *from)
+_copyFuncExpr(const FuncExpr *from)
{
FuncExpr *newnode = makeNode(FuncExpr);
* _copyNamedArgExpr *
*/
static NamedArgExpr *
-_copyNamedArgExpr(NamedArgExpr *from)
+_copyNamedArgExpr(const NamedArgExpr *from)
{
NamedArgExpr *newnode = makeNode(NamedArgExpr);
* _copyOpExpr
*/
static OpExpr *
-_copyOpExpr(OpExpr *from)
+_copyOpExpr(const OpExpr *from)
{
OpExpr *newnode = makeNode(OpExpr);
* _copyDistinctExpr (same as OpExpr)
*/
static DistinctExpr *
-_copyDistinctExpr(DistinctExpr *from)
+_copyDistinctExpr(const DistinctExpr *from)
{
DistinctExpr *newnode = makeNode(DistinctExpr);
* _copyNullIfExpr (same as OpExpr)
*/
static NullIfExpr *
-_copyNullIfExpr(NullIfExpr *from)
+_copyNullIfExpr(const NullIfExpr *from)
{
NullIfExpr *newnode = makeNode(NullIfExpr);
* _copyScalarArrayOpExpr
*/
static ScalarArrayOpExpr *
-_copyScalarArrayOpExpr(ScalarArrayOpExpr *from)
+_copyScalarArrayOpExpr(const ScalarArrayOpExpr *from)
{
ScalarArrayOpExpr *newnode = makeNode(ScalarArrayOpExpr);
* _copyBoolExpr
*/
static BoolExpr *
-_copyBoolExpr(BoolExpr *from)
+_copyBoolExpr(const BoolExpr *from)
{
BoolExpr *newnode = makeNode(BoolExpr);
* _copySubLink
*/
static SubLink *
-_copySubLink(SubLink *from)
+_copySubLink(const SubLink *from)
{
SubLink *newnode = makeNode(SubLink);
* _copySubPlan
*/
static SubPlan *
-_copySubPlan(SubPlan *from)
+_copySubPlan(const SubPlan *from)
{
SubPlan *newnode = makeNode(SubPlan);
* _copyAlternativeSubPlan
*/
static AlternativeSubPlan *
-_copyAlternativeSubPlan(AlternativeSubPlan *from)
+_copyAlternativeSubPlan(const AlternativeSubPlan *from)
{
AlternativeSubPlan *newnode = makeNode(AlternativeSubPlan);
* _copyFieldSelect
*/
static FieldSelect *
-_copyFieldSelect(FieldSelect *from)
+_copyFieldSelect(const FieldSelect *from)
{
FieldSelect *newnode = makeNode(FieldSelect);
* _copyFieldStore
*/
static FieldStore *
-_copyFieldStore(FieldStore *from)
+_copyFieldStore(const FieldStore *from)
{
FieldStore *newnode = makeNode(FieldStore);
* _copyRelabelType
*/
static RelabelType *
-_copyRelabelType(RelabelType *from)
+_copyRelabelType(const RelabelType *from)
{
RelabelType *newnode = makeNode(RelabelType);
* _copyCoerceViaIO
*/
static CoerceViaIO *
-_copyCoerceViaIO(CoerceViaIO *from)
+_copyCoerceViaIO(const CoerceViaIO *from)
{
CoerceViaIO *newnode = makeNode(CoerceViaIO);
* _copyArrayCoerceExpr
*/
static ArrayCoerceExpr *
-_copyArrayCoerceExpr(ArrayCoerceExpr *from)
+_copyArrayCoerceExpr(const ArrayCoerceExpr *from)
{
ArrayCoerceExpr *newnode = makeNode(ArrayCoerceExpr);
* _copyConvertRowtypeExpr
*/
static ConvertRowtypeExpr *
-_copyConvertRowtypeExpr(ConvertRowtypeExpr *from)
+_copyConvertRowtypeExpr(const ConvertRowtypeExpr *from)
{
ConvertRowtypeExpr *newnode = makeNode(ConvertRowtypeExpr);
* _copyCollateExpr
*/
static CollateExpr *
-_copyCollateExpr(CollateExpr *from)
+_copyCollateExpr(const CollateExpr *from)
{
CollateExpr *newnode = makeNode(CollateExpr);
* _copyCaseExpr
*/
static CaseExpr *
-_copyCaseExpr(CaseExpr *from)
+_copyCaseExpr(const CaseExpr *from)
{
CaseExpr *newnode = makeNode(CaseExpr);
* _copyCaseWhen
*/
static CaseWhen *
-_copyCaseWhen(CaseWhen *from)
+_copyCaseWhen(const CaseWhen *from)
{
CaseWhen *newnode = makeNode(CaseWhen);
* _copyCaseTestExpr
*/
static CaseTestExpr *
-_copyCaseTestExpr(CaseTestExpr *from)
+_copyCaseTestExpr(const CaseTestExpr *from)
{
CaseTestExpr *newnode = makeNode(CaseTestExpr);
* _copyArrayExpr
*/
static ArrayExpr *
-_copyArrayExpr(ArrayExpr *from)
+_copyArrayExpr(const ArrayExpr *from)
{
ArrayExpr *newnode = makeNode(ArrayExpr);
* _copyRowExpr
*/
static RowExpr *
-_copyRowExpr(RowExpr *from)
+_copyRowExpr(const RowExpr *from)
{
RowExpr *newnode = makeNode(RowExpr);
* _copyRowCompareExpr
*/
static RowCompareExpr *
-_copyRowCompareExpr(RowCompareExpr *from)
+_copyRowCompareExpr(const RowCompareExpr *from)
{
RowCompareExpr *newnode = makeNode(RowCompareExpr);
* _copyCoalesceExpr
*/
static CoalesceExpr *
-_copyCoalesceExpr(CoalesceExpr *from)
+_copyCoalesceExpr(const CoalesceExpr *from)
{
CoalesceExpr *newnode = makeNode(CoalesceExpr);
* _copyMinMaxExpr
*/
static MinMaxExpr *
-_copyMinMaxExpr(MinMaxExpr *from)
+_copyMinMaxExpr(const MinMaxExpr *from)
{
MinMaxExpr *newnode = makeNode(MinMaxExpr);
* _copyXmlExpr
*/
static XmlExpr *
-_copyXmlExpr(XmlExpr *from)
+_copyXmlExpr(const XmlExpr *from)
{
XmlExpr *newnode = makeNode(XmlExpr);
* _copyNullTest
*/
static NullTest *
-_copyNullTest(NullTest *from)
+_copyNullTest(const NullTest *from)
{
NullTest *newnode = makeNode(NullTest);
* _copyBooleanTest
*/
static BooleanTest *
-_copyBooleanTest(BooleanTest *from)
+_copyBooleanTest(const BooleanTest *from)
{
BooleanTest *newnode = makeNode(BooleanTest);
* _copyCoerceToDomain
*/
static CoerceToDomain *
-_copyCoerceToDomain(CoerceToDomain *from)
+_copyCoerceToDomain(const CoerceToDomain *from)
{
CoerceToDomain *newnode = makeNode(CoerceToDomain);
* _copyCoerceToDomainValue
*/
static CoerceToDomainValue *
-_copyCoerceToDomainValue(CoerceToDomainValue *from)
+_copyCoerceToDomainValue(const CoerceToDomainValue *from)
{
CoerceToDomainValue *newnode = makeNode(CoerceToDomainValue);
* _copySetToDefault
*/
static SetToDefault *
-_copySetToDefault(SetToDefault *from)
+_copySetToDefault(const SetToDefault *from)
{
SetToDefault *newnode = makeNode(SetToDefault);
* _copyCurrentOfExpr
*/
static CurrentOfExpr *
-_copyCurrentOfExpr(CurrentOfExpr *from)
+_copyCurrentOfExpr(const CurrentOfExpr *from)
{
CurrentOfExpr *newnode = makeNode(CurrentOfExpr);
* _copyTargetEntry
*/
static TargetEntry *
-_copyTargetEntry(TargetEntry *from)
+_copyTargetEntry(const TargetEntry *from)
{
TargetEntry *newnode = makeNode(TargetEntry);
* _copyRangeTblRef
*/
static RangeTblRef *
-_copyRangeTblRef(RangeTblRef *from)
+_copyRangeTblRef(const RangeTblRef *from)
{
RangeTblRef *newnode = makeNode(RangeTblRef);
* _copyJoinExpr
*/
static JoinExpr *
-_copyJoinExpr(JoinExpr *from)
+_copyJoinExpr(const JoinExpr *from)
{
JoinExpr *newnode = makeNode(JoinExpr);
* _copyFromExpr
*/
static FromExpr *
-_copyFromExpr(FromExpr *from)
+_copyFromExpr(const FromExpr *from)
{
FromExpr *newnode = makeNode(FromExpr);
* _copyPathKey
*/
static PathKey *
-_copyPathKey(PathKey *from)
+_copyPathKey(const PathKey *from)
{
PathKey *newnode = makeNode(PathKey);
* _copyRestrictInfo
*/
static RestrictInfo *
-_copyRestrictInfo(RestrictInfo *from)
+_copyRestrictInfo(const RestrictInfo *from)
{
RestrictInfo *newnode = makeNode(RestrictInfo);
* _copyPlaceHolderVar
*/
static PlaceHolderVar *
-_copyPlaceHolderVar(PlaceHolderVar *from)
+_copyPlaceHolderVar(const PlaceHolderVar *from)
{
PlaceHolderVar *newnode = makeNode(PlaceHolderVar);
* _copySpecialJoinInfo
*/
static SpecialJoinInfo *
-_copySpecialJoinInfo(SpecialJoinInfo *from)
+_copySpecialJoinInfo(const SpecialJoinInfo *from)
{
SpecialJoinInfo *newnode = makeNode(SpecialJoinInfo);
* _copyAppendRelInfo
*/
static AppendRelInfo *
-_copyAppendRelInfo(AppendRelInfo *from)
+_copyAppendRelInfo(const AppendRelInfo *from)
{
AppendRelInfo *newnode = makeNode(AppendRelInfo);
* _copyPlaceHolderInfo
*/
static PlaceHolderInfo *
-_copyPlaceHolderInfo(PlaceHolderInfo *from)
+_copyPlaceHolderInfo(const PlaceHolderInfo *from)
{
PlaceHolderInfo *newnode = makeNode(PlaceHolderInfo);
*/
static RangeTblEntry *
-_copyRangeTblEntry(RangeTblEntry *from)
+_copyRangeTblEntry(const RangeTblEntry *from)
{
RangeTblEntry *newnode = makeNode(RangeTblEntry);
}
static SortGroupClause *
-_copySortGroupClause(SortGroupClause *from)
+_copySortGroupClause(const SortGroupClause *from)
{
SortGroupClause *newnode = makeNode(SortGroupClause);
}
static WindowClause *
-_copyWindowClause(WindowClause *from)
+_copyWindowClause(const WindowClause *from)
{
WindowClause *newnode = makeNode(WindowClause);
}
static RowMarkClause *
-_copyRowMarkClause(RowMarkClause *from)
+_copyRowMarkClause(const RowMarkClause *from)
{
RowMarkClause *newnode = makeNode(RowMarkClause);
}
static WithClause *
-_copyWithClause(WithClause *from)
+_copyWithClause(const WithClause *from)
{
WithClause *newnode = makeNode(WithClause);
}
static CommonTableExpr *
-_copyCommonTableExpr(CommonTableExpr *from)
+_copyCommonTableExpr(const CommonTableExpr *from)
{
CommonTableExpr *newnode = makeNode(CommonTableExpr);
}
static A_Expr *
-_copyAExpr(A_Expr *from)
+_copyAExpr(const A_Expr *from)
{
A_Expr *newnode = makeNode(A_Expr);
}
static ColumnRef *
-_copyColumnRef(ColumnRef *from)
+_copyColumnRef(const ColumnRef *from)
{
ColumnRef *newnode = makeNode(ColumnRef);
}
static ParamRef *
-_copyParamRef(ParamRef *from)
+_copyParamRef(const ParamRef *from)
{
ParamRef *newnode = makeNode(ParamRef);
}
static A_Const *
-_copyAConst(A_Const *from)
+_copyAConst(const A_Const *from)
{
A_Const *newnode = makeNode(A_Const);
}
static FuncCall *
-_copyFuncCall(FuncCall *from)
+_copyFuncCall(const FuncCall *from)
{
FuncCall *newnode = makeNode(FuncCall);
}
static A_Star *
-_copyAStar(A_Star *from)
+_copyAStar(const A_Star *from)
{
A_Star *newnode = makeNode(A_Star);
}
static A_Indices *
-_copyAIndices(A_Indices *from)
+_copyAIndices(const A_Indices *from)
{
A_Indices *newnode = makeNode(A_Indices);
}
static A_Indirection *
-_copyA_Indirection(A_Indirection *from)
+_copyA_Indirection(const A_Indirection *from)
{
A_Indirection *newnode = makeNode(A_Indirection);
}
static A_ArrayExpr *
-_copyA_ArrayExpr(A_ArrayExpr *from)
+_copyA_ArrayExpr(const A_ArrayExpr *from)
{
A_ArrayExpr *newnode = makeNode(A_ArrayExpr);
}
static ResTarget *
-_copyResTarget(ResTarget *from)
+_copyResTarget(const ResTarget *from)
{
ResTarget *newnode = makeNode(ResTarget);
}
static TypeName *
-_copyTypeName(TypeName *from)
+_copyTypeName(const TypeName *from)
{
TypeName *newnode = makeNode(TypeName);
}
static SortBy *
-_copySortBy(SortBy *from)
+_copySortBy(const SortBy *from)
{
SortBy *newnode = makeNode(SortBy);
}
static WindowDef *
-_copyWindowDef(WindowDef *from)
+_copyWindowDef(const WindowDef *from)
{
WindowDef *newnode = makeNode(WindowDef);
}
static RangeSubselect *
-_copyRangeSubselect(RangeSubselect *from)
+_copyRangeSubselect(const RangeSubselect *from)
{
RangeSubselect *newnode = makeNode(RangeSubselect);
}
static RangeFunction *
-_copyRangeFunction(RangeFunction *from)
+_copyRangeFunction(const RangeFunction *from)
{
RangeFunction *newnode = makeNode(RangeFunction);
}
static TypeCast *
-_copyTypeCast(TypeCast *from)
+_copyTypeCast(const TypeCast *from)
{
TypeCast *newnode = makeNode(TypeCast);
}
static CollateClause *
-_copyCollateClause(CollateClause *from)
+_copyCollateClause(const CollateClause *from)
{
CollateClause *newnode = makeNode(CollateClause);
}
static IndexElem *
-_copyIndexElem(IndexElem *from)
+_copyIndexElem(const IndexElem *from)
{
IndexElem *newnode = makeNode(IndexElem);
}
static ColumnDef *
-_copyColumnDef(ColumnDef *from)
+_copyColumnDef(const ColumnDef *from)
{
ColumnDef *newnode = makeNode(ColumnDef);
}
static Constraint *
-_copyConstraint(Constraint *from)
+_copyConstraint(const Constraint *from)
{
Constraint *newnode = makeNode(Constraint);
}
static DefElem *
-_copyDefElem(DefElem *from)
+_copyDefElem(const DefElem *from)
{
DefElem *newnode = makeNode(DefElem);
}
static LockingClause *
-_copyLockingClause(LockingClause *from)
+_copyLockingClause(const LockingClause *from)
{
LockingClause *newnode = makeNode(LockingClause);
}
static XmlSerialize *
-_copyXmlSerialize(XmlSerialize *from)
+_copyXmlSerialize(const XmlSerialize *from)
{
XmlSerialize *newnode = makeNode(XmlSerialize);
}
static Query *
-_copyQuery(Query *from)
+_copyQuery(const Query *from)
{
Query *newnode = makeNode(Query);
}
static InsertStmt *
-_copyInsertStmt(InsertStmt *from)
+_copyInsertStmt(const InsertStmt *from)
{
InsertStmt *newnode = makeNode(InsertStmt);
}
static DeleteStmt *
-_copyDeleteStmt(DeleteStmt *from)
+_copyDeleteStmt(const DeleteStmt *from)
{
DeleteStmt *newnode = makeNode(DeleteStmt);
}
static UpdateStmt *
-_copyUpdateStmt(UpdateStmt *from)
+_copyUpdateStmt(const UpdateStmt *from)
{
UpdateStmt *newnode = makeNode(UpdateStmt);
}
static SelectStmt *
-_copySelectStmt(SelectStmt *from)
+_copySelectStmt(const SelectStmt *from)
{
SelectStmt *newnode = makeNode(SelectStmt);
}
static SetOperationStmt *
-_copySetOperationStmt(SetOperationStmt *from)
+_copySetOperationStmt(const SetOperationStmt *from)
{
SetOperationStmt *newnode = makeNode(SetOperationStmt);
}
static AlterTableStmt *
-_copyAlterTableStmt(AlterTableStmt *from)
+_copyAlterTableStmt(const AlterTableStmt *from)
{
AlterTableStmt *newnode = makeNode(AlterTableStmt);
}
static AlterTableCmd *
-_copyAlterTableCmd(AlterTableCmd *from)
+_copyAlterTableCmd(const AlterTableCmd *from)
{
AlterTableCmd *newnode = makeNode(AlterTableCmd);
}
static AlterDomainStmt *
-_copyAlterDomainStmt(AlterDomainStmt *from)
+_copyAlterDomainStmt(const AlterDomainStmt *from)
{
AlterDomainStmt *newnode = makeNode(AlterDomainStmt);
}
static GrantStmt *
-_copyGrantStmt(GrantStmt *from)
+_copyGrantStmt(const GrantStmt *from)
{
GrantStmt *newnode = makeNode(GrantStmt);
}
static PrivGrantee *
-_copyPrivGrantee(PrivGrantee *from)
+_copyPrivGrantee(const PrivGrantee *from)
{
PrivGrantee *newnode = makeNode(PrivGrantee);
}
static FuncWithArgs *
-_copyFuncWithArgs(FuncWithArgs *from)
+_copyFuncWithArgs(const FuncWithArgs *from)
{
FuncWithArgs *newnode = makeNode(FuncWithArgs);
}
static AccessPriv *
-_copyAccessPriv(AccessPriv *from)
+_copyAccessPriv(const AccessPriv *from)
{
AccessPriv *newnode = makeNode(AccessPriv);
}
static GrantRoleStmt *
-_copyGrantRoleStmt(GrantRoleStmt *from)
+_copyGrantRoleStmt(const GrantRoleStmt *from)
{
GrantRoleStmt *newnode = makeNode(GrantRoleStmt);
}
static AlterDefaultPrivilegesStmt *
-_copyAlterDefaultPrivilegesStmt(AlterDefaultPrivilegesStmt *from)
+_copyAlterDefaultPrivilegesStmt(const AlterDefaultPrivilegesStmt *from)
{
AlterDefaultPrivilegesStmt *newnode = makeNode(AlterDefaultPrivilegesStmt);
}
static DeclareCursorStmt *
-_copyDeclareCursorStmt(DeclareCursorStmt *from)
+_copyDeclareCursorStmt(const DeclareCursorStmt *from)
{
DeclareCursorStmt *newnode = makeNode(DeclareCursorStmt);
}
static ClosePortalStmt *
-_copyClosePortalStmt(ClosePortalStmt *from)
+_copyClosePortalStmt(const ClosePortalStmt *from)
{
ClosePortalStmt *newnode = makeNode(ClosePortalStmt);
}
static ClusterStmt *
-_copyClusterStmt(ClusterStmt *from)
+_copyClusterStmt(const ClusterStmt *from)
{
ClusterStmt *newnode = makeNode(ClusterStmt);
}
static CopyStmt *
-_copyCopyStmt(CopyStmt *from)
+_copyCopyStmt(const CopyStmt *from)
{
CopyStmt *newnode = makeNode(CopyStmt);
* copy functions for classes which inherit from CreateStmt.
*/
static void
-CopyCreateStmtFields(CreateStmt *from, CreateStmt *newnode)
+CopyCreateStmtFields(const CreateStmt *from, CreateStmt *newnode)
{
COPY_NODE_FIELD(relation);
COPY_NODE_FIELD(tableElts);
}
static CreateStmt *
-_copyCreateStmt(CreateStmt *from)
+_copyCreateStmt(const CreateStmt *from)
{
CreateStmt *newnode = makeNode(CreateStmt);
}
static InhRelation *
-_copyInhRelation(InhRelation *from)
+_copyInhRelation(const InhRelation *from)
{
InhRelation *newnode = makeNode(InhRelation);
}
static DefineStmt *
-_copyDefineStmt(DefineStmt *from)
+_copyDefineStmt(const DefineStmt *from)
{
DefineStmt *newnode = makeNode(DefineStmt);
}
static DropStmt *
-_copyDropStmt(DropStmt *from)
+_copyDropStmt(const DropStmt *from)
{
DropStmt *newnode = makeNode(DropStmt);
}
static TruncateStmt *
-_copyTruncateStmt(TruncateStmt *from)
+_copyTruncateStmt(const TruncateStmt *from)
{
TruncateStmt *newnode = makeNode(TruncateStmt);
}
static CommentStmt *
-_copyCommentStmt(CommentStmt *from)
+_copyCommentStmt(const CommentStmt *from)
{
CommentStmt *newnode = makeNode(CommentStmt);
}
static SecLabelStmt *
-_copySecLabelStmt(SecLabelStmt *from)
+_copySecLabelStmt(const SecLabelStmt *from)
{
SecLabelStmt *newnode = makeNode(SecLabelStmt);
}
static FetchStmt *
-_copyFetchStmt(FetchStmt *from)
+_copyFetchStmt(const FetchStmt *from)
{
FetchStmt *newnode = makeNode(FetchStmt);
}
static IndexStmt *
-_copyIndexStmt(IndexStmt *from)
+_copyIndexStmt(const IndexStmt *from)
{
IndexStmt *newnode = makeNode(IndexStmt);
}
static CreateFunctionStmt *
-_copyCreateFunctionStmt(CreateFunctionStmt *from)
+_copyCreateFunctionStmt(const CreateFunctionStmt *from)
{
CreateFunctionStmt *newnode = makeNode(CreateFunctionStmt);
}
static FunctionParameter *
-_copyFunctionParameter(FunctionParameter *from)
+_copyFunctionParameter(const FunctionParameter *from)
{
FunctionParameter *newnode = makeNode(FunctionParameter);
}
static AlterFunctionStmt *
-_copyAlterFunctionStmt(AlterFunctionStmt *from)
+_copyAlterFunctionStmt(const AlterFunctionStmt *from)
{
AlterFunctionStmt *newnode = makeNode(AlterFunctionStmt);
}
static DoStmt *
-_copyDoStmt(DoStmt *from)
+_copyDoStmt(const DoStmt *from)
{
DoStmt *newnode = makeNode(DoStmt);
}
static RenameStmt *
-_copyRenameStmt(RenameStmt *from)
+_copyRenameStmt(const RenameStmt *from)
{
RenameStmt *newnode = makeNode(RenameStmt);
}
static AlterObjectSchemaStmt *
-_copyAlterObjectSchemaStmt(AlterObjectSchemaStmt *from)
+_copyAlterObjectSchemaStmt(const AlterObjectSchemaStmt *from)
{
AlterObjectSchemaStmt *newnode = makeNode(AlterObjectSchemaStmt);
}
static AlterOwnerStmt *
-_copyAlterOwnerStmt(AlterOwnerStmt *from)
+_copyAlterOwnerStmt(const AlterOwnerStmt *from)
{
AlterOwnerStmt *newnode = makeNode(AlterOwnerStmt);
}
static RuleStmt *
-_copyRuleStmt(RuleStmt *from)
+_copyRuleStmt(const RuleStmt *from)
{
RuleStmt *newnode = makeNode(RuleStmt);
}
static NotifyStmt *
-_copyNotifyStmt(NotifyStmt *from)
+_copyNotifyStmt(const NotifyStmt *from)
{
NotifyStmt *newnode = makeNode(NotifyStmt);
}
static ListenStmt *
-_copyListenStmt(ListenStmt *from)
+_copyListenStmt(const ListenStmt *from)
{
ListenStmt *newnode = makeNode(ListenStmt);
}
static UnlistenStmt *
-_copyUnlistenStmt(UnlistenStmt *from)
+_copyUnlistenStmt(const UnlistenStmt *from)
{
UnlistenStmt *newnode = makeNode(UnlistenStmt);
}
static TransactionStmt *
-_copyTransactionStmt(TransactionStmt *from)
+_copyTransactionStmt(const TransactionStmt *from)
{
TransactionStmt *newnode = makeNode(TransactionStmt);
}
static CompositeTypeStmt *
-_copyCompositeTypeStmt(CompositeTypeStmt *from)
+_copyCompositeTypeStmt(const CompositeTypeStmt *from)
{
CompositeTypeStmt *newnode = makeNode(CompositeTypeStmt);
}
static CreateEnumStmt *
-_copyCreateEnumStmt(CreateEnumStmt *from)
+_copyCreateEnumStmt(const CreateEnumStmt *from)
{
CreateEnumStmt *newnode = makeNode(CreateEnumStmt);
}
static CreateRangeStmt *
-_copyCreateRangeStmt(CreateRangeStmt *from)
+_copyCreateRangeStmt(const CreateRangeStmt *from)
{
CreateRangeStmt *newnode = makeNode(CreateRangeStmt);
}
static AlterEnumStmt *
-_copyAlterEnumStmt(AlterEnumStmt *from)
+_copyAlterEnumStmt(const AlterEnumStmt *from)
{
AlterEnumStmt *newnode = makeNode(AlterEnumStmt);
}
static ViewStmt *
-_copyViewStmt(ViewStmt *from)
+_copyViewStmt(const ViewStmt *from)
{
ViewStmt *newnode = makeNode(ViewStmt);
}
static LoadStmt *
-_copyLoadStmt(LoadStmt *from)
+_copyLoadStmt(const LoadStmt *from)
{
LoadStmt *newnode = makeNode(LoadStmt);
}
static CreateDomainStmt *
-_copyCreateDomainStmt(CreateDomainStmt *from)
+_copyCreateDomainStmt(const CreateDomainStmt *from)
{
CreateDomainStmt *newnode = makeNode(CreateDomainStmt);
}
static CreateOpClassStmt *
-_copyCreateOpClassStmt(CreateOpClassStmt *from)
+_copyCreateOpClassStmt(const CreateOpClassStmt *from)
{
CreateOpClassStmt *newnode = makeNode(CreateOpClassStmt);
}
static CreateOpClassItem *
-_copyCreateOpClassItem(CreateOpClassItem *from)
+_copyCreateOpClassItem(const CreateOpClassItem *from)
{
CreateOpClassItem *newnode = makeNode(CreateOpClassItem);
}
static CreateOpFamilyStmt *
-_copyCreateOpFamilyStmt(CreateOpFamilyStmt *from)
+_copyCreateOpFamilyStmt(const CreateOpFamilyStmt *from)
{
CreateOpFamilyStmt *newnode = makeNode(CreateOpFamilyStmt);
}
static AlterOpFamilyStmt *
-_copyAlterOpFamilyStmt(AlterOpFamilyStmt *from)
+_copyAlterOpFamilyStmt(const AlterOpFamilyStmt *from)
{
AlterOpFamilyStmt *newnode = makeNode(AlterOpFamilyStmt);
}
static CreatedbStmt *
-_copyCreatedbStmt(CreatedbStmt *from)
+_copyCreatedbStmt(const CreatedbStmt *from)
{
CreatedbStmt *newnode = makeNode(CreatedbStmt);
}
static AlterDatabaseStmt *
-_copyAlterDatabaseStmt(AlterDatabaseStmt *from)
+_copyAlterDatabaseStmt(const AlterDatabaseStmt *from)
{
AlterDatabaseStmt *newnode = makeNode(AlterDatabaseStmt);
}
static AlterDatabaseSetStmt *
-_copyAlterDatabaseSetStmt(AlterDatabaseSetStmt *from)
+_copyAlterDatabaseSetStmt(const AlterDatabaseSetStmt *from)
{
AlterDatabaseSetStmt *newnode = makeNode(AlterDatabaseSetStmt);
}
static DropdbStmt *
-_copyDropdbStmt(DropdbStmt *from)
+_copyDropdbStmt(const DropdbStmt *from)
{
DropdbStmt *newnode = makeNode(DropdbStmt);
}
static VacuumStmt *
-_copyVacuumStmt(VacuumStmt *from)
+_copyVacuumStmt(const VacuumStmt *from)
{
VacuumStmt *newnode = makeNode(VacuumStmt);
}
static ExplainStmt *
-_copyExplainStmt(ExplainStmt *from)
+_copyExplainStmt(const ExplainStmt *from)
{
ExplainStmt *newnode = makeNode(ExplainStmt);
}
static CreateSeqStmt *
-_copyCreateSeqStmt(CreateSeqStmt *from)
+_copyCreateSeqStmt(const CreateSeqStmt *from)
{
CreateSeqStmt *newnode = makeNode(CreateSeqStmt);
}
static AlterSeqStmt *
-_copyAlterSeqStmt(AlterSeqStmt *from)
+_copyAlterSeqStmt(const AlterSeqStmt *from)
{
AlterSeqStmt *newnode = makeNode(AlterSeqStmt);
}
static VariableSetStmt *
-_copyVariableSetStmt(VariableSetStmt *from)
+_copyVariableSetStmt(const VariableSetStmt *from)
{
VariableSetStmt *newnode = makeNode(VariableSetStmt);
}
static VariableShowStmt *
-_copyVariableShowStmt(VariableShowStmt *from)
+_copyVariableShowStmt(const VariableShowStmt *from)
{
VariableShowStmt *newnode = makeNode(VariableShowStmt);
}
static DiscardStmt *
-_copyDiscardStmt(DiscardStmt *from)
+_copyDiscardStmt(const DiscardStmt *from)
{
DiscardStmt *newnode = makeNode(DiscardStmt);
}
static CreateTableSpaceStmt *
-_copyCreateTableSpaceStmt(CreateTableSpaceStmt *from)
+_copyCreateTableSpaceStmt(const CreateTableSpaceStmt *from)
{
CreateTableSpaceStmt *newnode = makeNode(CreateTableSpaceStmt);
}
static DropTableSpaceStmt *
-_copyDropTableSpaceStmt(DropTableSpaceStmt *from)
+_copyDropTableSpaceStmt(const DropTableSpaceStmt *from)
{
DropTableSpaceStmt *newnode = makeNode(DropTableSpaceStmt);
}
static AlterTableSpaceOptionsStmt *
-_copyAlterTableSpaceOptionsStmt(AlterTableSpaceOptionsStmt *from)
+_copyAlterTableSpaceOptionsStmt(const AlterTableSpaceOptionsStmt *from)
{
AlterTableSpaceOptionsStmt *newnode = makeNode(AlterTableSpaceOptionsStmt);
}
static CreateExtensionStmt *
-_copyCreateExtensionStmt(CreateExtensionStmt *from)
+_copyCreateExtensionStmt(const CreateExtensionStmt *from)
{
CreateExtensionStmt *newnode = makeNode(CreateExtensionStmt);
}
static AlterExtensionStmt *
-_copyAlterExtensionStmt(AlterExtensionStmt *from)
+_copyAlterExtensionStmt(const AlterExtensionStmt *from)
{
AlterExtensionStmt *newnode = makeNode(AlterExtensionStmt);
}
static AlterExtensionContentsStmt *
-_copyAlterExtensionContentsStmt(AlterExtensionContentsStmt *from)
+_copyAlterExtensionContentsStmt(const AlterExtensionContentsStmt *from)
{
AlterExtensionContentsStmt *newnode = makeNode(AlterExtensionContentsStmt);
}
static CreateFdwStmt *
-_copyCreateFdwStmt(CreateFdwStmt *from)
+_copyCreateFdwStmt(const CreateFdwStmt *from)
{
CreateFdwStmt *newnode = makeNode(CreateFdwStmt);
}
static AlterFdwStmt *
-_copyAlterFdwStmt(AlterFdwStmt *from)
+_copyAlterFdwStmt(const AlterFdwStmt *from)
{
AlterFdwStmt *newnode = makeNode(AlterFdwStmt);
}
static CreateForeignServerStmt *
-_copyCreateForeignServerStmt(CreateForeignServerStmt *from)
+_copyCreateForeignServerStmt(const CreateForeignServerStmt *from)
{
CreateForeignServerStmt *newnode = makeNode(CreateForeignServerStmt);
}
static AlterForeignServerStmt *
-_copyAlterForeignServerStmt(AlterForeignServerStmt *from)
+_copyAlterForeignServerStmt(const AlterForeignServerStmt *from)
{
AlterForeignServerStmt *newnode = makeNode(AlterForeignServerStmt);
}
static CreateUserMappingStmt *
-_copyCreateUserMappingStmt(CreateUserMappingStmt *from)
+_copyCreateUserMappingStmt(const CreateUserMappingStmt *from)
{
CreateUserMappingStmt *newnode = makeNode(CreateUserMappingStmt);
}
static AlterUserMappingStmt *
-_copyAlterUserMappingStmt(AlterUserMappingStmt *from)
+_copyAlterUserMappingStmt(const AlterUserMappingStmt *from)
{
AlterUserMappingStmt *newnode = makeNode(AlterUserMappingStmt);
}
static DropUserMappingStmt *
-_copyDropUserMappingStmt(DropUserMappingStmt *from)
+_copyDropUserMappingStmt(const DropUserMappingStmt *from)
{
DropUserMappingStmt *newnode = makeNode(DropUserMappingStmt);
}
static CreateForeignTableStmt *
-_copyCreateForeignTableStmt(CreateForeignTableStmt *from)
+_copyCreateForeignTableStmt(const CreateForeignTableStmt *from)
{
CreateForeignTableStmt *newnode = makeNode(CreateForeignTableStmt);
- CopyCreateStmtFields((CreateStmt *) from, (CreateStmt *) newnode);
+ CopyCreateStmtFields((const CreateStmt *) from, (CreateStmt *) newnode);
COPY_STRING_FIELD(servername);
COPY_NODE_FIELD(options);
}
static CreateTrigStmt *
-_copyCreateTrigStmt(CreateTrigStmt *from)
+_copyCreateTrigStmt(const CreateTrigStmt *from)
{
CreateTrigStmt *newnode = makeNode(CreateTrigStmt);
}
static CreatePLangStmt *
-_copyCreatePLangStmt(CreatePLangStmt *from)
+_copyCreatePLangStmt(const CreatePLangStmt *from)
{
CreatePLangStmt *newnode = makeNode(CreatePLangStmt);
}
static CreateRoleStmt *
-_copyCreateRoleStmt(CreateRoleStmt *from)
+_copyCreateRoleStmt(const CreateRoleStmt *from)
{
CreateRoleStmt *newnode = makeNode(CreateRoleStmt);
}
static AlterRoleStmt *
-_copyAlterRoleStmt(AlterRoleStmt *from)
+_copyAlterRoleStmt(const AlterRoleStmt *from)
{
AlterRoleStmt *newnode = makeNode(AlterRoleStmt);
}
static AlterRoleSetStmt *
-_copyAlterRoleSetStmt(AlterRoleSetStmt *from)
+_copyAlterRoleSetStmt(const AlterRoleSetStmt *from)
{
AlterRoleSetStmt *newnode = makeNode(AlterRoleSetStmt);
}
static DropRoleStmt *
-_copyDropRoleStmt(DropRoleStmt *from)
+_copyDropRoleStmt(const DropRoleStmt *from)
{
DropRoleStmt *newnode = makeNode(DropRoleStmt);
}
static LockStmt *
-_copyLockStmt(LockStmt *from)
+_copyLockStmt(const LockStmt *from)
{
LockStmt *newnode = makeNode(LockStmt);
}
static ConstraintsSetStmt *
-_copyConstraintsSetStmt(ConstraintsSetStmt *from)
+_copyConstraintsSetStmt(const ConstraintsSetStmt *from)
{
ConstraintsSetStmt *newnode = makeNode(ConstraintsSetStmt);
}
static ReindexStmt *
-_copyReindexStmt(ReindexStmt *from)
+_copyReindexStmt(const ReindexStmt *from)
{
ReindexStmt *newnode = makeNode(ReindexStmt);
}
static CreateSchemaStmt *
-_copyCreateSchemaStmt(CreateSchemaStmt *from)
+_copyCreateSchemaStmt(const CreateSchemaStmt *from)
{
CreateSchemaStmt *newnode = makeNode(CreateSchemaStmt);
}
static CreateConversionStmt *
-_copyCreateConversionStmt(CreateConversionStmt *from)
+_copyCreateConversionStmt(const CreateConversionStmt *from)
{
CreateConversionStmt *newnode = makeNode(CreateConversionStmt);
}
static CreateCastStmt *
-_copyCreateCastStmt(CreateCastStmt *from)
+_copyCreateCastStmt(const CreateCastStmt *from)
{
CreateCastStmt *newnode = makeNode(CreateCastStmt);
}
static PrepareStmt *
-_copyPrepareStmt(PrepareStmt *from)
+_copyPrepareStmt(const PrepareStmt *from)
{
PrepareStmt *newnode = makeNode(PrepareStmt);
}
static ExecuteStmt *
-_copyExecuteStmt(ExecuteStmt *from)
+_copyExecuteStmt(const ExecuteStmt *from)
{
ExecuteStmt *newnode = makeNode(ExecuteStmt);
}
static DeallocateStmt *
-_copyDeallocateStmt(DeallocateStmt *from)
+_copyDeallocateStmt(const DeallocateStmt *from)
{
DeallocateStmt *newnode = makeNode(DeallocateStmt);
}
static DropOwnedStmt *
-_copyDropOwnedStmt(DropOwnedStmt *from)
+_copyDropOwnedStmt(const DropOwnedStmt *from)
{
DropOwnedStmt *newnode = makeNode(DropOwnedStmt);
}
static ReassignOwnedStmt *
-_copyReassignOwnedStmt(ReassignOwnedStmt *from)
+_copyReassignOwnedStmt(const ReassignOwnedStmt *from)
{
ReassignOwnedStmt *newnode = makeNode(ReassignOwnedStmt);
}
static AlterTSDictionaryStmt *
-_copyAlterTSDictionaryStmt(AlterTSDictionaryStmt *from)
+_copyAlterTSDictionaryStmt(const AlterTSDictionaryStmt *from)
{
AlterTSDictionaryStmt *newnode = makeNode(AlterTSDictionaryStmt);
}
static AlterTSConfigurationStmt *
-_copyAlterTSConfigurationStmt(AlterTSConfigurationStmt *from)
+_copyAlterTSConfigurationStmt(const AlterTSConfigurationStmt *from)
{
AlterTSConfigurationStmt *newnode = makeNode(AlterTSConfigurationStmt);
lfirst(new) = copyObject(lfirst(old));
static List *
-_copyList(List *from)
+_copyList(const List *from)
{
List *new;
ListCell *curr_old;
* ****************************************************************
*/
static Value *
-_copyValue(Value *from)
+_copyValue(const Value *from)
{
Value *newnode = makeNode(Value);
* substructure is copied too, recursively.
*/
void *
-copyObject(void *from)
+copyObject(const void *from)
{
void *retval;
default:
elog(ERROR, "unrecognized node type: %d", (int) nodeTag(from));
- retval = from; /* keep compiler quiet */
+ retval = 0; /* keep compiler quiet */
break;
}
*/
static bool
-_equalAlias(Alias *a, Alias *b)
+_equalAlias(const Alias *a, const Alias *b)
{
COMPARE_STRING_FIELD(aliasname);
COMPARE_NODE_FIELD(colnames);
}
static bool
-_equalRangeVar(RangeVar *a, RangeVar *b)
+_equalRangeVar(const RangeVar *a, const RangeVar *b)
{
COMPARE_STRING_FIELD(catalogname);
COMPARE_STRING_FIELD(schemaname);
}
static bool
-_equalIntoClause(IntoClause *a, IntoClause *b)
+_equalIntoClause(const IntoClause *a, const IntoClause *b)
{
COMPARE_NODE_FIELD(rel);
COMPARE_NODE_FIELD(colNames);
*/
static bool
-_equalVar(Var *a, Var *b)
+_equalVar(const Var *a, const Var *b)
{
COMPARE_SCALAR_FIELD(varno);
COMPARE_SCALAR_FIELD(varattno);
}
static bool
-_equalConst(Const *a, Const *b)
+_equalConst(const Const *a, const Const *b)
{
COMPARE_SCALAR_FIELD(consttype);
COMPARE_SCALAR_FIELD(consttypmod);
}
static bool
-_equalParam(Param *a, Param *b)
+_equalParam(const Param *a, const Param *b)
{
COMPARE_SCALAR_FIELD(paramkind);
COMPARE_SCALAR_FIELD(paramid);
}
static bool
-_equalAggref(Aggref *a, Aggref *b)
+_equalAggref(const Aggref *a, const Aggref *b)
{
COMPARE_SCALAR_FIELD(aggfnoid);
COMPARE_SCALAR_FIELD(aggtype);
}
static bool
-_equalWindowFunc(WindowFunc *a, WindowFunc *b)
+_equalWindowFunc(const WindowFunc *a, const WindowFunc *b)
{
COMPARE_SCALAR_FIELD(winfnoid);
COMPARE_SCALAR_FIELD(wintype);
}
static bool
-_equalArrayRef(ArrayRef *a, ArrayRef *b)
+_equalArrayRef(const ArrayRef *a, const ArrayRef *b)
{
COMPARE_SCALAR_FIELD(refarraytype);
COMPARE_SCALAR_FIELD(refelemtype);
}
static bool
-_equalFuncExpr(FuncExpr *a, FuncExpr *b)
+_equalFuncExpr(const FuncExpr *a, const FuncExpr *b)
{
COMPARE_SCALAR_FIELD(funcid);
COMPARE_SCALAR_FIELD(funcresulttype);
}
static bool
-_equalNamedArgExpr(NamedArgExpr *a, NamedArgExpr *b)
+_equalNamedArgExpr(const NamedArgExpr *a, const NamedArgExpr *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_STRING_FIELD(name);
}
static bool
-_equalOpExpr(OpExpr *a, OpExpr *b)
+_equalOpExpr(const OpExpr *a, const OpExpr *b)
{
COMPARE_SCALAR_FIELD(opno);
}
static bool
-_equalDistinctExpr(DistinctExpr *a, DistinctExpr *b)
+_equalDistinctExpr(const DistinctExpr *a, const DistinctExpr *b)
{
COMPARE_SCALAR_FIELD(opno);
}
static bool
-_equalNullIfExpr(NullIfExpr *a, NullIfExpr *b)
+_equalNullIfExpr(const NullIfExpr *a, const NullIfExpr *b)
{
COMPARE_SCALAR_FIELD(opno);
}
static bool
-_equalScalarArrayOpExpr(ScalarArrayOpExpr *a, ScalarArrayOpExpr *b)
+_equalScalarArrayOpExpr(const ScalarArrayOpExpr *a, const ScalarArrayOpExpr *b)
{
COMPARE_SCALAR_FIELD(opno);
}
static bool
-_equalBoolExpr(BoolExpr *a, BoolExpr *b)
+_equalBoolExpr(const BoolExpr *a, const BoolExpr *b)
{
COMPARE_SCALAR_FIELD(boolop);
COMPARE_NODE_FIELD(args);
}
static bool
-_equalSubLink(SubLink *a, SubLink *b)
+_equalSubLink(const SubLink *a, const SubLink *b)
{
COMPARE_SCALAR_FIELD(subLinkType);
COMPARE_NODE_FIELD(testexpr);
}
static bool
-_equalSubPlan(SubPlan *a, SubPlan *b)
+_equalSubPlan(const SubPlan *a, const SubPlan *b)
{
COMPARE_SCALAR_FIELD(subLinkType);
COMPARE_NODE_FIELD(testexpr);
}
static bool
-_equalAlternativeSubPlan(AlternativeSubPlan *a, AlternativeSubPlan *b)
+_equalAlternativeSubPlan(const AlternativeSubPlan *a, const AlternativeSubPlan *b)
{
COMPARE_NODE_FIELD(subplans);
}
static bool
-_equalFieldSelect(FieldSelect *a, FieldSelect *b)
+_equalFieldSelect(const FieldSelect *a, const FieldSelect *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_SCALAR_FIELD(fieldnum);
}
static bool
-_equalFieldStore(FieldStore *a, FieldStore *b)
+_equalFieldStore(const FieldStore *a, const FieldStore *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_NODE_FIELD(newvals);
}
static bool
-_equalRelabelType(RelabelType *a, RelabelType *b)
+_equalRelabelType(const RelabelType *a, const RelabelType *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_SCALAR_FIELD(resulttype);
}
static bool
-_equalCoerceViaIO(CoerceViaIO *a, CoerceViaIO *b)
+_equalCoerceViaIO(const CoerceViaIO *a, const CoerceViaIO *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_SCALAR_FIELD(resulttype);
}
static bool
-_equalArrayCoerceExpr(ArrayCoerceExpr *a, ArrayCoerceExpr *b)
+_equalArrayCoerceExpr(const ArrayCoerceExpr *a, const ArrayCoerceExpr *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_SCALAR_FIELD(elemfuncid);
}
static bool
-_equalConvertRowtypeExpr(ConvertRowtypeExpr *a, ConvertRowtypeExpr *b)
+_equalConvertRowtypeExpr(const ConvertRowtypeExpr *a, const ConvertRowtypeExpr *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_SCALAR_FIELD(resulttype);
}
static bool
-_equalCollateExpr(CollateExpr *a, CollateExpr *b)
+_equalCollateExpr(const CollateExpr *a, const CollateExpr *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_SCALAR_FIELD(collOid);
}
static bool
-_equalCaseExpr(CaseExpr *a, CaseExpr *b)
+_equalCaseExpr(const CaseExpr *a, const CaseExpr *b)
{
COMPARE_SCALAR_FIELD(casetype);
COMPARE_SCALAR_FIELD(casecollid);
}
static bool
-_equalCaseWhen(CaseWhen *a, CaseWhen *b)
+_equalCaseWhen(const CaseWhen *a, const CaseWhen *b)
{
COMPARE_NODE_FIELD(expr);
COMPARE_NODE_FIELD(result);
}
static bool
-_equalCaseTestExpr(CaseTestExpr *a, CaseTestExpr *b)
+_equalCaseTestExpr(const CaseTestExpr *a, const CaseTestExpr *b)
{
COMPARE_SCALAR_FIELD(typeId);
COMPARE_SCALAR_FIELD(typeMod);
}
static bool
-_equalArrayExpr(ArrayExpr *a, ArrayExpr *b)
+_equalArrayExpr(const ArrayExpr *a, const ArrayExpr *b)
{
COMPARE_SCALAR_FIELD(array_typeid);
COMPARE_SCALAR_FIELD(array_collid);
}
static bool
-_equalRowExpr(RowExpr *a, RowExpr *b)
+_equalRowExpr(const RowExpr *a, const RowExpr *b)
{
COMPARE_NODE_FIELD(args);
COMPARE_SCALAR_FIELD(row_typeid);
}
static bool
-_equalRowCompareExpr(RowCompareExpr *a, RowCompareExpr *b)
+_equalRowCompareExpr(const RowCompareExpr *a, const RowCompareExpr *b)
{
COMPARE_SCALAR_FIELD(rctype);
COMPARE_NODE_FIELD(opnos);
}
static bool
-_equalCoalesceExpr(CoalesceExpr *a, CoalesceExpr *b)
+_equalCoalesceExpr(const CoalesceExpr *a, const CoalesceExpr *b)
{
COMPARE_SCALAR_FIELD(coalescetype);
COMPARE_SCALAR_FIELD(coalescecollid);
}
static bool
-_equalMinMaxExpr(MinMaxExpr *a, MinMaxExpr *b)
+_equalMinMaxExpr(const MinMaxExpr *a, const MinMaxExpr *b)
{
COMPARE_SCALAR_FIELD(minmaxtype);
COMPARE_SCALAR_FIELD(minmaxcollid);
}
static bool
-_equalXmlExpr(XmlExpr *a, XmlExpr *b)
+_equalXmlExpr(const XmlExpr *a, const XmlExpr *b)
{
COMPARE_SCALAR_FIELD(op);
COMPARE_STRING_FIELD(name);
}
static bool
-_equalNullTest(NullTest *a, NullTest *b)
+_equalNullTest(const NullTest *a, const NullTest *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_SCALAR_FIELD(nulltesttype);
}
static bool
-_equalBooleanTest(BooleanTest *a, BooleanTest *b)
+_equalBooleanTest(const BooleanTest *a, const BooleanTest *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_SCALAR_FIELD(booltesttype);
}
static bool
-_equalCoerceToDomain(CoerceToDomain *a, CoerceToDomain *b)
+_equalCoerceToDomain(const CoerceToDomain *a, const CoerceToDomain *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_SCALAR_FIELD(resulttype);
}
static bool
-_equalCoerceToDomainValue(CoerceToDomainValue *a, CoerceToDomainValue *b)
+_equalCoerceToDomainValue(const CoerceToDomainValue *a, const CoerceToDomainValue *b)
{
COMPARE_SCALAR_FIELD(typeId);
COMPARE_SCALAR_FIELD(typeMod);
}
static bool
-_equalSetToDefault(SetToDefault *a, SetToDefault *b)
+_equalSetToDefault(const SetToDefault *a, const SetToDefault *b)
{
COMPARE_SCALAR_FIELD(typeId);
COMPARE_SCALAR_FIELD(typeMod);
}
static bool
-_equalCurrentOfExpr(CurrentOfExpr *a, CurrentOfExpr *b)
+_equalCurrentOfExpr(const CurrentOfExpr *a, const CurrentOfExpr *b)
{
COMPARE_SCALAR_FIELD(cvarno);
COMPARE_STRING_FIELD(cursor_name);
}
static bool
-_equalTargetEntry(TargetEntry *a, TargetEntry *b)
+_equalTargetEntry(const TargetEntry *a, const TargetEntry *b)
{
COMPARE_NODE_FIELD(expr);
COMPARE_SCALAR_FIELD(resno);
}
static bool
-_equalRangeTblRef(RangeTblRef *a, RangeTblRef *b)
+_equalRangeTblRef(const RangeTblRef *a, const RangeTblRef *b)
{
COMPARE_SCALAR_FIELD(rtindex);
}
static bool
-_equalJoinExpr(JoinExpr *a, JoinExpr *b)
+_equalJoinExpr(const JoinExpr *a, const JoinExpr *b)
{
COMPARE_SCALAR_FIELD(jointype);
COMPARE_SCALAR_FIELD(isNatural);
}
static bool
-_equalFromExpr(FromExpr *a, FromExpr *b)
+_equalFromExpr(const FromExpr *a, const FromExpr *b)
{
COMPARE_NODE_FIELD(fromlist);
COMPARE_NODE_FIELD(quals);
*/
static bool
-_equalPathKey(PathKey *a, PathKey *b)
+_equalPathKey(const PathKey *a, const PathKey *b)
{
/*
* This is normally used on non-canonicalized PathKeys, so must chase up
}
static bool
-_equalRestrictInfo(RestrictInfo *a, RestrictInfo *b)
+_equalRestrictInfo(const RestrictInfo *a, const RestrictInfo *b)
{
COMPARE_NODE_FIELD(clause);
COMPARE_SCALAR_FIELD(is_pushed_down);
}
static bool
-_equalPlaceHolderVar(PlaceHolderVar *a, PlaceHolderVar *b)
+_equalPlaceHolderVar(const PlaceHolderVar *a, const PlaceHolderVar *b)
{
/*
* We intentionally do not compare phexpr. Two PlaceHolderVars with the
}
static bool
-_equalSpecialJoinInfo(SpecialJoinInfo *a, SpecialJoinInfo *b)
+_equalSpecialJoinInfo(const SpecialJoinInfo *a, const SpecialJoinInfo *b)
{
COMPARE_BITMAPSET_FIELD(min_lefthand);
COMPARE_BITMAPSET_FIELD(min_righthand);
}
static bool
-_equalAppendRelInfo(AppendRelInfo *a, AppendRelInfo *b)
+_equalAppendRelInfo(const AppendRelInfo *a, const AppendRelInfo *b)
{
COMPARE_SCALAR_FIELD(parent_relid);
COMPARE_SCALAR_FIELD(child_relid);
}
static bool
-_equalPlaceHolderInfo(PlaceHolderInfo *a, PlaceHolderInfo *b)
+_equalPlaceHolderInfo(const PlaceHolderInfo *a, const PlaceHolderInfo *b)
{
COMPARE_SCALAR_FIELD(phid);
COMPARE_NODE_FIELD(ph_var);
*/
static bool
-_equalQuery(Query *a, Query *b)
+_equalQuery(const Query *a, const Query *b)
{
COMPARE_SCALAR_FIELD(commandType);
COMPARE_SCALAR_FIELD(querySource);
}
static bool
-_equalInsertStmt(InsertStmt *a, InsertStmt *b)
+_equalInsertStmt(const InsertStmt *a, const InsertStmt *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(cols);
}
static bool
-_equalDeleteStmt(DeleteStmt *a, DeleteStmt *b)
+_equalDeleteStmt(const DeleteStmt *a, const DeleteStmt *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(usingClause);
}
static bool
-_equalUpdateStmt(UpdateStmt *a, UpdateStmt *b)
+_equalUpdateStmt(const UpdateStmt *a, const UpdateStmt *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(targetList);
}
static bool
-_equalSelectStmt(SelectStmt *a, SelectStmt *b)
+_equalSelectStmt(const SelectStmt *a, const SelectStmt *b)
{
COMPARE_NODE_FIELD(distinctClause);
COMPARE_NODE_FIELD(intoClause);
}
static bool
-_equalSetOperationStmt(SetOperationStmt *a, SetOperationStmt *b)
+_equalSetOperationStmt(const SetOperationStmt *a, const SetOperationStmt *b)
{
COMPARE_SCALAR_FIELD(op);
COMPARE_SCALAR_FIELD(all);
}
static bool
-_equalAlterTableStmt(AlterTableStmt *a, AlterTableStmt *b)
+_equalAlterTableStmt(const AlterTableStmt *a, const AlterTableStmt *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(cmds);
}
static bool
-_equalAlterTableCmd(AlterTableCmd *a, AlterTableCmd *b)
+_equalAlterTableCmd(const AlterTableCmd *a, const AlterTableCmd *b)
{
COMPARE_SCALAR_FIELD(subtype);
COMPARE_STRING_FIELD(name);
}
static bool
-_equalAlterDomainStmt(AlterDomainStmt *a, AlterDomainStmt *b)
+_equalAlterDomainStmt(const AlterDomainStmt *a, const AlterDomainStmt *b)
{
COMPARE_SCALAR_FIELD(subtype);
COMPARE_NODE_FIELD(typeName);
}
static bool
-_equalGrantStmt(GrantStmt *a, GrantStmt *b)
+_equalGrantStmt(const GrantStmt *a, const GrantStmt *b)
{
COMPARE_SCALAR_FIELD(is_grant);
COMPARE_SCALAR_FIELD(targtype);
}
static bool
-_equalPrivGrantee(PrivGrantee *a, PrivGrantee *b)
+_equalPrivGrantee(const PrivGrantee *a, const PrivGrantee *b)
{
COMPARE_STRING_FIELD(rolname);
}
static bool
-_equalFuncWithArgs(FuncWithArgs *a, FuncWithArgs *b)
+_equalFuncWithArgs(const FuncWithArgs *a, const FuncWithArgs *b)
{
COMPARE_NODE_FIELD(funcname);
COMPARE_NODE_FIELD(funcargs);
}
static bool
-_equalAccessPriv(AccessPriv *a, AccessPriv *b)
+_equalAccessPriv(const AccessPriv *a, const AccessPriv *b)
{
COMPARE_STRING_FIELD(priv_name);
COMPARE_NODE_FIELD(cols);
}
static bool
-_equalGrantRoleStmt(GrantRoleStmt *a, GrantRoleStmt *b)
+_equalGrantRoleStmt(const GrantRoleStmt *a, const GrantRoleStmt *b)
{
COMPARE_NODE_FIELD(granted_roles);
COMPARE_NODE_FIELD(grantee_roles);
}
static bool
-_equalAlterDefaultPrivilegesStmt(AlterDefaultPrivilegesStmt *a, AlterDefaultPrivilegesStmt *b)
+_equalAlterDefaultPrivilegesStmt(const AlterDefaultPrivilegesStmt *a, const AlterDefaultPrivilegesStmt *b)
{
COMPARE_NODE_FIELD(options);
COMPARE_NODE_FIELD(action);
}
static bool
-_equalDeclareCursorStmt(DeclareCursorStmt *a, DeclareCursorStmt *b)
+_equalDeclareCursorStmt(const DeclareCursorStmt *a, const DeclareCursorStmt *b)
{
COMPARE_STRING_FIELD(portalname);
COMPARE_SCALAR_FIELD(options);
}
static bool
-_equalClosePortalStmt(ClosePortalStmt *a, ClosePortalStmt *b)
+_equalClosePortalStmt(const ClosePortalStmt *a, const ClosePortalStmt *b)
{
COMPARE_STRING_FIELD(portalname);
}
static bool
-_equalClusterStmt(ClusterStmt *a, ClusterStmt *b)
+_equalClusterStmt(const ClusterStmt *a, const ClusterStmt *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_STRING_FIELD(indexname);
}
static bool
-_equalCopyStmt(CopyStmt *a, CopyStmt *b)
+_equalCopyStmt(const CopyStmt *a, const CopyStmt *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(query);
}
static bool
-_equalCreateStmt(CreateStmt *a, CreateStmt *b)
+_equalCreateStmt(const CreateStmt *a, const CreateStmt *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(tableElts);
}
static bool
-_equalInhRelation(InhRelation *a, InhRelation *b)
+_equalInhRelation(const InhRelation *a, const InhRelation *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_SCALAR_FIELD(options);
}
static bool
-_equalDefineStmt(DefineStmt *a, DefineStmt *b)
+_equalDefineStmt(const DefineStmt *a, const DefineStmt *b)
{
COMPARE_SCALAR_FIELD(kind);
COMPARE_SCALAR_FIELD(oldstyle);
}
static bool
-_equalDropStmt(DropStmt *a, DropStmt *b)
+_equalDropStmt(const DropStmt *a, const DropStmt *b)
{
COMPARE_NODE_FIELD(objects);
COMPARE_NODE_FIELD(arguments);
}
static bool
-_equalTruncateStmt(TruncateStmt *a, TruncateStmt *b)
+_equalTruncateStmt(const TruncateStmt *a, const TruncateStmt *b)
{
COMPARE_NODE_FIELD(relations);
COMPARE_SCALAR_FIELD(restart_seqs);
}
static bool
-_equalCommentStmt(CommentStmt *a, CommentStmt *b)
+_equalCommentStmt(const CommentStmt *a, const CommentStmt *b)
{
COMPARE_SCALAR_FIELD(objtype);
COMPARE_NODE_FIELD(objname);
}
static bool
-_equalSecLabelStmt(SecLabelStmt *a, SecLabelStmt *b)
+_equalSecLabelStmt(const SecLabelStmt *a, const SecLabelStmt *b)
{
COMPARE_SCALAR_FIELD(objtype);
COMPARE_NODE_FIELD(objname);
}
static bool
-_equalFetchStmt(FetchStmt *a, FetchStmt *b)
+_equalFetchStmt(const FetchStmt *a, const FetchStmt *b)
{
COMPARE_SCALAR_FIELD(direction);
COMPARE_SCALAR_FIELD(howMany);
}
static bool
-_equalIndexStmt(IndexStmt *a, IndexStmt *b)
+_equalIndexStmt(const IndexStmt *a, const IndexStmt *b)
{
COMPARE_STRING_FIELD(idxname);
COMPARE_NODE_FIELD(relation);
}
static bool
-_equalCreateFunctionStmt(CreateFunctionStmt *a, CreateFunctionStmt *b)
+_equalCreateFunctionStmt(const CreateFunctionStmt *a, const CreateFunctionStmt *b)
{
COMPARE_SCALAR_FIELD(replace);
COMPARE_NODE_FIELD(funcname);
}
static bool
-_equalFunctionParameter(FunctionParameter *a, FunctionParameter *b)
+_equalFunctionParameter(const FunctionParameter *a, const FunctionParameter *b)
{
COMPARE_STRING_FIELD(name);
COMPARE_NODE_FIELD(argType);
}
static bool
-_equalAlterFunctionStmt(AlterFunctionStmt *a, AlterFunctionStmt *b)
+_equalAlterFunctionStmt(const AlterFunctionStmt *a, const AlterFunctionStmt *b)
{
COMPARE_NODE_FIELD(func);
COMPARE_NODE_FIELD(actions);
}
static bool
-_equalDoStmt(DoStmt *a, DoStmt *b)
+_equalDoStmt(const DoStmt *a, const DoStmt *b)
{
COMPARE_NODE_FIELD(args);
}
static bool
-_equalRenameStmt(RenameStmt *a, RenameStmt *b)
+_equalRenameStmt(const RenameStmt *a, const RenameStmt *b)
{
COMPARE_SCALAR_FIELD(renameType);
COMPARE_NODE_FIELD(relation);
}
static bool
-_equalAlterObjectSchemaStmt(AlterObjectSchemaStmt *a, AlterObjectSchemaStmt *b)
+_equalAlterObjectSchemaStmt(const AlterObjectSchemaStmt *a, const AlterObjectSchemaStmt *b)
{
COMPARE_SCALAR_FIELD(objectType);
COMPARE_NODE_FIELD(relation);
}
static bool
-_equalAlterOwnerStmt(AlterOwnerStmt *a, AlterOwnerStmt *b)
+_equalAlterOwnerStmt(const AlterOwnerStmt *a, const AlterOwnerStmt *b)
{
COMPARE_SCALAR_FIELD(objectType);
COMPARE_NODE_FIELD(relation);
}
static bool
-_equalRuleStmt(RuleStmt *a, RuleStmt *b)
+_equalRuleStmt(const RuleStmt *a, const RuleStmt *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_STRING_FIELD(rulename);
}
static bool
-_equalNotifyStmt(NotifyStmt *a, NotifyStmt *b)
+_equalNotifyStmt(const NotifyStmt *a, const NotifyStmt *b)
{
COMPARE_STRING_FIELD(conditionname);
COMPARE_STRING_FIELD(payload);
}
static bool
-_equalListenStmt(ListenStmt *a, ListenStmt *b)
+_equalListenStmt(const ListenStmt *a, const ListenStmt *b)
{
COMPARE_STRING_FIELD(conditionname);
}
static bool
-_equalUnlistenStmt(UnlistenStmt *a, UnlistenStmt *b)
+_equalUnlistenStmt(const UnlistenStmt *a, const UnlistenStmt *b)
{
COMPARE_STRING_FIELD(conditionname);
}
static bool
-_equalTransactionStmt(TransactionStmt *a, TransactionStmt *b)
+_equalTransactionStmt(const TransactionStmt *a, const TransactionStmt *b)
{
COMPARE_SCALAR_FIELD(kind);
COMPARE_NODE_FIELD(options);
}
static bool
-_equalCompositeTypeStmt(CompositeTypeStmt *a, CompositeTypeStmt *b)
+_equalCompositeTypeStmt(const CompositeTypeStmt *a, const CompositeTypeStmt *b)
{
COMPARE_NODE_FIELD(typevar);
COMPARE_NODE_FIELD(coldeflist);
}
static bool
-_equalCreateEnumStmt(CreateEnumStmt *a, CreateEnumStmt *b)
+_equalCreateEnumStmt(const CreateEnumStmt *a, const CreateEnumStmt *b)
{
COMPARE_NODE_FIELD(typeName);
COMPARE_NODE_FIELD(vals);
}
static bool
-_equalCreateRangeStmt(CreateRangeStmt *a, CreateRangeStmt *b)
+_equalCreateRangeStmt(const CreateRangeStmt *a, const CreateRangeStmt *b)
{
COMPARE_NODE_FIELD(typeName);
COMPARE_NODE_FIELD(params);
}
static bool
-_equalAlterEnumStmt(AlterEnumStmt *a, AlterEnumStmt *b)
+_equalAlterEnumStmt(const AlterEnumStmt *a, const AlterEnumStmt *b)
{
COMPARE_NODE_FIELD(typeName);
COMPARE_STRING_FIELD(newVal);
}
static bool
-_equalViewStmt(ViewStmt *a, ViewStmt *b)
+_equalViewStmt(const ViewStmt *a, const ViewStmt *b)
{
COMPARE_NODE_FIELD(view);
COMPARE_NODE_FIELD(aliases);
}
static bool
-_equalLoadStmt(LoadStmt *a, LoadStmt *b)
+_equalLoadStmt(const LoadStmt *a, const LoadStmt *b)
{
COMPARE_STRING_FIELD(filename);
}
static bool
-_equalCreateDomainStmt(CreateDomainStmt *a, CreateDomainStmt *b)
+_equalCreateDomainStmt(const CreateDomainStmt *a, const CreateDomainStmt *b)
{
COMPARE_NODE_FIELD(domainname);
COMPARE_NODE_FIELD(typeName);
}
static bool
-_equalCreateOpClassStmt(CreateOpClassStmt *a, CreateOpClassStmt *b)
+_equalCreateOpClassStmt(const CreateOpClassStmt *a, const CreateOpClassStmt *b)
{
COMPARE_NODE_FIELD(opclassname);
COMPARE_NODE_FIELD(opfamilyname);
}
static bool
-_equalCreateOpClassItem(CreateOpClassItem *a, CreateOpClassItem *b)
+_equalCreateOpClassItem(const CreateOpClassItem *a, const CreateOpClassItem *b)
{
COMPARE_SCALAR_FIELD(itemtype);
COMPARE_NODE_FIELD(name);
}
static bool
-_equalCreateOpFamilyStmt(CreateOpFamilyStmt *a, CreateOpFamilyStmt *b)
+_equalCreateOpFamilyStmt(const CreateOpFamilyStmt *a, const CreateOpFamilyStmt *b)
{
COMPARE_NODE_FIELD(opfamilyname);
COMPARE_STRING_FIELD(amname);
}
static bool
-_equalAlterOpFamilyStmt(AlterOpFamilyStmt *a, AlterOpFamilyStmt *b)
+_equalAlterOpFamilyStmt(const AlterOpFamilyStmt *a, const AlterOpFamilyStmt *b)
{
COMPARE_NODE_FIELD(opfamilyname);
COMPARE_STRING_FIELD(amname);
}
static bool
-_equalCreatedbStmt(CreatedbStmt *a, CreatedbStmt *b)
+_equalCreatedbStmt(const CreatedbStmt *a, const CreatedbStmt *b)
{
COMPARE_STRING_FIELD(dbname);
COMPARE_NODE_FIELD(options);
}
static bool
-_equalAlterDatabaseStmt(AlterDatabaseStmt *a, AlterDatabaseStmt *b)
+_equalAlterDatabaseStmt(const AlterDatabaseStmt *a, const AlterDatabaseStmt *b)
{
COMPARE_STRING_FIELD(dbname);
COMPARE_NODE_FIELD(options);
}
static bool
-_equalAlterDatabaseSetStmt(AlterDatabaseSetStmt *a, AlterDatabaseSetStmt *b)
+_equalAlterDatabaseSetStmt(const AlterDatabaseSetStmt *a, const AlterDatabaseSetStmt *b)
{
COMPARE_STRING_FIELD(dbname);
COMPARE_NODE_FIELD(setstmt);
}
static bool
-_equalDropdbStmt(DropdbStmt *a, DropdbStmt *b)
+_equalDropdbStmt(const DropdbStmt *a, const DropdbStmt *b)
{
COMPARE_STRING_FIELD(dbname);
COMPARE_SCALAR_FIELD(missing_ok);
}
static bool
-_equalVacuumStmt(VacuumStmt *a, VacuumStmt *b)
+_equalVacuumStmt(const VacuumStmt *a, const VacuumStmt *b)
{
COMPARE_SCALAR_FIELD(options);
COMPARE_SCALAR_FIELD(freeze_min_age);
}
static bool
-_equalExplainStmt(ExplainStmt *a, ExplainStmt *b)
+_equalExplainStmt(const ExplainStmt *a, const ExplainStmt *b)
{
COMPARE_NODE_FIELD(query);
COMPARE_NODE_FIELD(options);
}
static bool
-_equalCreateSeqStmt(CreateSeqStmt *a, CreateSeqStmt *b)
+_equalCreateSeqStmt(const CreateSeqStmt *a, const CreateSeqStmt *b)
{
COMPARE_NODE_FIELD(sequence);
COMPARE_NODE_FIELD(options);
}
static bool
-_equalAlterSeqStmt(AlterSeqStmt *a, AlterSeqStmt *b)
+_equalAlterSeqStmt(const AlterSeqStmt *a, const AlterSeqStmt *b)
{
COMPARE_NODE_FIELD(sequence);
COMPARE_NODE_FIELD(options);
}
static bool
-_equalVariableSetStmt(VariableSetStmt *a, VariableSetStmt *b)
+_equalVariableSetStmt(const VariableSetStmt *a, const VariableSetStmt *b)
{
COMPARE_SCALAR_FIELD(kind);
COMPARE_STRING_FIELD(name);
}
static bool
-_equalVariableShowStmt(VariableShowStmt *a, VariableShowStmt *b)
+_equalVariableShowStmt(const VariableShowStmt *a, const VariableShowStmt *b)
{
COMPARE_STRING_FIELD(name);
}
static bool
-_equalDiscardStmt(DiscardStmt *a, DiscardStmt *b)
+_equalDiscardStmt(const DiscardStmt *a, const DiscardStmt *b)
{
COMPARE_SCALAR_FIELD(target);
}
static bool
-_equalCreateTableSpaceStmt(CreateTableSpaceStmt *a, CreateTableSpaceStmt *b)
+_equalCreateTableSpaceStmt(const CreateTableSpaceStmt *a, const CreateTableSpaceStmt *b)
{
COMPARE_STRING_FIELD(tablespacename);
COMPARE_STRING_FIELD(owner);
}
static bool
-_equalDropTableSpaceStmt(DropTableSpaceStmt *a, DropTableSpaceStmt *b)
+_equalDropTableSpaceStmt(const DropTableSpaceStmt *a, const DropTableSpaceStmt *b)
{
COMPARE_STRING_FIELD(tablespacename);
COMPARE_SCALAR_FIELD(missing_ok);
}
static bool
-_equalAlterTableSpaceOptionsStmt(AlterTableSpaceOptionsStmt *a,
- AlterTableSpaceOptionsStmt *b)
+_equalAlterTableSpaceOptionsStmt(const AlterTableSpaceOptionsStmt *a,
+ const AlterTableSpaceOptionsStmt *b)
{
COMPARE_STRING_FIELD(tablespacename);
COMPARE_NODE_FIELD(options);
}
static bool
-_equalCreateExtensionStmt(CreateExtensionStmt *a, CreateExtensionStmt *b)
+_equalCreateExtensionStmt(const CreateExtensionStmt *a, const CreateExtensionStmt *b)
{
COMPARE_STRING_FIELD(extname);
COMPARE_SCALAR_FIELD(if_not_exists);
}
static bool
-_equalAlterExtensionStmt(AlterExtensionStmt *a, AlterExtensionStmt *b)
+_equalAlterExtensionStmt(const AlterExtensionStmt *a, const AlterExtensionStmt *b)
{
COMPARE_STRING_FIELD(extname);
COMPARE_NODE_FIELD(options);
}
static bool
-_equalAlterExtensionContentsStmt(AlterExtensionContentsStmt *a, AlterExtensionContentsStmt *b)
+_equalAlterExtensionContentsStmt(const AlterExtensionContentsStmt *a, const AlterExtensionContentsStmt *b)
{
COMPARE_STRING_FIELD(extname);
COMPARE_SCALAR_FIELD(action);
}
static bool
-_equalCreateFdwStmt(CreateFdwStmt *a, CreateFdwStmt *b)
+_equalCreateFdwStmt(const CreateFdwStmt *a, const CreateFdwStmt *b)
{
COMPARE_STRING_FIELD(fdwname);
COMPARE_NODE_FIELD(func_options);
}
static bool
-_equalAlterFdwStmt(AlterFdwStmt *a, AlterFdwStmt *b)
+_equalAlterFdwStmt(const AlterFdwStmt *a, const AlterFdwStmt *b)
{
COMPARE_STRING_FIELD(fdwname);
COMPARE_NODE_FIELD(func_options);
}
static bool
-_equalCreateForeignServerStmt(CreateForeignServerStmt *a, CreateForeignServerStmt *b)
+_equalCreateForeignServerStmt(const CreateForeignServerStmt *a, const CreateForeignServerStmt *b)
{
COMPARE_STRING_FIELD(servername);
COMPARE_STRING_FIELD(servertype);
}
static bool
-_equalAlterForeignServerStmt(AlterForeignServerStmt *a, AlterForeignServerStmt *b)
+_equalAlterForeignServerStmt(const AlterForeignServerStmt *a, const AlterForeignServerStmt *b)
{
COMPARE_STRING_FIELD(servername);
COMPARE_STRING_FIELD(version);
}
static bool
-_equalCreateUserMappingStmt(CreateUserMappingStmt *a, CreateUserMappingStmt *b)
+_equalCreateUserMappingStmt(const CreateUserMappingStmt *a, const CreateUserMappingStmt *b)
{
COMPARE_STRING_FIELD(username);
COMPARE_STRING_FIELD(servername);
}
static bool
-_equalAlterUserMappingStmt(AlterUserMappingStmt *a, AlterUserMappingStmt *b)
+_equalAlterUserMappingStmt(const AlterUserMappingStmt *a, const AlterUserMappingStmt *b)
{
COMPARE_STRING_FIELD(username);
COMPARE_STRING_FIELD(servername);
}
static bool
-_equalDropUserMappingStmt(DropUserMappingStmt *a, DropUserMappingStmt *b)
+_equalDropUserMappingStmt(const DropUserMappingStmt *a, const DropUserMappingStmt *b)
{
COMPARE_STRING_FIELD(username);
COMPARE_STRING_FIELD(servername);
}
static bool
-_equalCreateForeignTableStmt(CreateForeignTableStmt *a, CreateForeignTableStmt *b)
+_equalCreateForeignTableStmt(const CreateForeignTableStmt *a, const CreateForeignTableStmt *b)
{
if (!_equalCreateStmt(&a->base, &b->base))
return false;
}
static bool
-_equalCreateTrigStmt(CreateTrigStmt *a, CreateTrigStmt *b)
+_equalCreateTrigStmt(const CreateTrigStmt *a, const CreateTrigStmt *b)
{
COMPARE_STRING_FIELD(trigname);
COMPARE_NODE_FIELD(relation);
}
static bool
-_equalCreatePLangStmt(CreatePLangStmt *a, CreatePLangStmt *b)
+_equalCreatePLangStmt(const CreatePLangStmt *a, const CreatePLangStmt *b)
{
COMPARE_SCALAR_FIELD(replace);
COMPARE_STRING_FIELD(plname);
}
static bool
-_equalCreateRoleStmt(CreateRoleStmt *a, CreateRoleStmt *b)
+_equalCreateRoleStmt(const CreateRoleStmt *a, const CreateRoleStmt *b)
{
COMPARE_SCALAR_FIELD(stmt_type);
COMPARE_STRING_FIELD(role);
}
static bool
-_equalAlterRoleStmt(AlterRoleStmt *a, AlterRoleStmt *b)
+_equalAlterRoleStmt(const AlterRoleStmt *a, const AlterRoleStmt *b)
{
COMPARE_STRING_FIELD(role);
COMPARE_NODE_FIELD(options);
}
static bool
-_equalAlterRoleSetStmt(AlterRoleSetStmt *a, AlterRoleSetStmt *b)
+_equalAlterRoleSetStmt(const AlterRoleSetStmt *a, const AlterRoleSetStmt *b)
{
COMPARE_STRING_FIELD(role);
COMPARE_STRING_FIELD(database);
}
static bool
-_equalDropRoleStmt(DropRoleStmt *a, DropRoleStmt *b)
+_equalDropRoleStmt(const DropRoleStmt *a, const DropRoleStmt *b)
{
COMPARE_NODE_FIELD(roles);
COMPARE_SCALAR_FIELD(missing_ok);
}
static bool
-_equalLockStmt(LockStmt *a, LockStmt *b)
+_equalLockStmt(const LockStmt *a, const LockStmt *b)
{
COMPARE_NODE_FIELD(relations);
COMPARE_SCALAR_FIELD(mode);
}
static bool
-_equalConstraintsSetStmt(ConstraintsSetStmt *a, ConstraintsSetStmt *b)
+_equalConstraintsSetStmt(const ConstraintsSetStmt *a, const ConstraintsSetStmt *b)
{
COMPARE_NODE_FIELD(constraints);
COMPARE_SCALAR_FIELD(deferred);
}
static bool
-_equalReindexStmt(ReindexStmt *a, ReindexStmt *b)
+_equalReindexStmt(const ReindexStmt *a, const ReindexStmt *b)
{
COMPARE_SCALAR_FIELD(kind);
COMPARE_NODE_FIELD(relation);
}
static bool
-_equalCreateSchemaStmt(CreateSchemaStmt *a, CreateSchemaStmt *b)
+_equalCreateSchemaStmt(const CreateSchemaStmt *a, const CreateSchemaStmt *b)
{
COMPARE_STRING_FIELD(schemaname);
COMPARE_STRING_FIELD(authid);
}
static bool
-_equalCreateConversionStmt(CreateConversionStmt *a, CreateConversionStmt *b)
+_equalCreateConversionStmt(const CreateConversionStmt *a, const CreateConversionStmt *b)
{
COMPARE_NODE_FIELD(conversion_name);
COMPARE_STRING_FIELD(for_encoding_name);
}
static bool
-_equalCreateCastStmt(CreateCastStmt *a, CreateCastStmt *b)
+_equalCreateCastStmt(const CreateCastStmt *a, const CreateCastStmt *b)
{
COMPARE_NODE_FIELD(sourcetype);
COMPARE_NODE_FIELD(targettype);
}
static bool
-_equalPrepareStmt(PrepareStmt *a, PrepareStmt *b)
+_equalPrepareStmt(const PrepareStmt *a, const PrepareStmt *b)
{
COMPARE_STRING_FIELD(name);
COMPARE_NODE_FIELD(argtypes);
}
static bool
-_equalExecuteStmt(ExecuteStmt *a, ExecuteStmt *b)
+_equalExecuteStmt(const ExecuteStmt *a, const ExecuteStmt *b)
{
COMPARE_STRING_FIELD(name);
COMPARE_NODE_FIELD(into);
}
static bool
-_equalDeallocateStmt(DeallocateStmt *a, DeallocateStmt *b)
+_equalDeallocateStmt(const DeallocateStmt *a, const DeallocateStmt *b)
{
COMPARE_STRING_FIELD(name);
}
static bool
-_equalDropOwnedStmt(DropOwnedStmt *a, DropOwnedStmt *b)
+_equalDropOwnedStmt(const DropOwnedStmt *a, const DropOwnedStmt *b)
{
COMPARE_NODE_FIELD(roles);
COMPARE_SCALAR_FIELD(behavior);
}
static bool
-_equalReassignOwnedStmt(ReassignOwnedStmt *a, ReassignOwnedStmt *b)
+_equalReassignOwnedStmt(const ReassignOwnedStmt *a, const ReassignOwnedStmt *b)
{
COMPARE_NODE_FIELD(roles);
COMPARE_NODE_FIELD(newrole);
}
static bool
-_equalAlterTSDictionaryStmt(AlterTSDictionaryStmt *a, AlterTSDictionaryStmt *b)
+_equalAlterTSDictionaryStmt(const AlterTSDictionaryStmt *a, const AlterTSDictionaryStmt *b)
{
COMPARE_NODE_FIELD(dictname);
COMPARE_NODE_FIELD(options);
}
static bool
-_equalAlterTSConfigurationStmt(AlterTSConfigurationStmt *a,
- AlterTSConfigurationStmt *b)
+_equalAlterTSConfigurationStmt(const AlterTSConfigurationStmt *a,
+ const AlterTSConfigurationStmt *b)
{
COMPARE_NODE_FIELD(cfgname);
COMPARE_NODE_FIELD(tokentype);
}
static bool
-_equalAExpr(A_Expr *a, A_Expr *b)
+_equalAExpr(const A_Expr *a, const A_Expr *b)
{
COMPARE_SCALAR_FIELD(kind);
COMPARE_NODE_FIELD(name);
}
static bool
-_equalColumnRef(ColumnRef *a, ColumnRef *b)
+_equalColumnRef(const ColumnRef *a, const ColumnRef *b)
{
COMPARE_NODE_FIELD(fields);
COMPARE_LOCATION_FIELD(location);
}
static bool
-_equalParamRef(ParamRef *a, ParamRef *b)
+_equalParamRef(const ParamRef *a, const ParamRef *b)
{
COMPARE_SCALAR_FIELD(number);
COMPARE_LOCATION_FIELD(location);
}
static bool
-_equalAConst(A_Const *a, A_Const *b)
+_equalAConst(const A_Const *a, const A_Const *b)
{
if (!equal(&a->val, &b->val)) /* hack for in-line Value field */
return false;
}
static bool
-_equalFuncCall(FuncCall *a, FuncCall *b)
+_equalFuncCall(const FuncCall *a, const FuncCall *b)
{
COMPARE_NODE_FIELD(funcname);
COMPARE_NODE_FIELD(args);
}
static bool
-_equalAStar(A_Star *a, A_Star *b)
+_equalAStar(const A_Star *a, const A_Star *b)
{
return true;
}
static bool
-_equalAIndices(A_Indices *a, A_Indices *b)
+_equalAIndices(const A_Indices *a, const A_Indices *b)
{
COMPARE_NODE_FIELD(lidx);
COMPARE_NODE_FIELD(uidx);
}
static bool
-_equalA_Indirection(A_Indirection *a, A_Indirection *b)
+_equalA_Indirection(const A_Indirection *a, const A_Indirection *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_NODE_FIELD(indirection);
}
static bool
-_equalA_ArrayExpr(A_ArrayExpr *a, A_ArrayExpr *b)
+_equalA_ArrayExpr(const A_ArrayExpr *a, const A_ArrayExpr *b)
{
COMPARE_NODE_FIELD(elements);
COMPARE_LOCATION_FIELD(location);
}
static bool
-_equalResTarget(ResTarget *a, ResTarget *b)
+_equalResTarget(const ResTarget *a, const ResTarget *b)
{
COMPARE_STRING_FIELD(name);
COMPARE_NODE_FIELD(indirection);
}
static bool
-_equalTypeName(TypeName *a, TypeName *b)
+_equalTypeName(const TypeName *a, const TypeName *b)
{
COMPARE_NODE_FIELD(names);
COMPARE_SCALAR_FIELD(typeOid);
}
static bool
-_equalTypeCast(TypeCast *a, TypeCast *b)
+_equalTypeCast(const TypeCast *a, const TypeCast *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_NODE_FIELD(typeName);
}
static bool
-_equalCollateClause(CollateClause *a, CollateClause *b)
+_equalCollateClause(const CollateClause *a, const CollateClause *b)
{
COMPARE_NODE_FIELD(arg);
COMPARE_NODE_FIELD(collname);
}
static bool
-_equalSortBy(SortBy *a, SortBy *b)
+_equalSortBy(const SortBy *a, const SortBy *b)
{
COMPARE_NODE_FIELD(node);
COMPARE_SCALAR_FIELD(sortby_dir);
}
static bool
-_equalWindowDef(WindowDef *a, WindowDef *b)
+_equalWindowDef(const WindowDef *a, const WindowDef *b)
{
COMPARE_STRING_FIELD(name);
COMPARE_STRING_FIELD(refname);
}
static bool
-_equalRangeSubselect(RangeSubselect *a, RangeSubselect *b)
+_equalRangeSubselect(const RangeSubselect *a, const RangeSubselect *b)
{
COMPARE_NODE_FIELD(subquery);
COMPARE_NODE_FIELD(alias);
}
static bool
-_equalRangeFunction(RangeFunction *a, RangeFunction *b)
+_equalRangeFunction(const RangeFunction *a, const RangeFunction *b)
{
COMPARE_NODE_FIELD(funccallnode);
COMPARE_NODE_FIELD(alias);
}
static bool
-_equalIndexElem(IndexElem *a, IndexElem *b)
+_equalIndexElem(const IndexElem *a, const IndexElem *b)
{
COMPARE_STRING_FIELD(name);
COMPARE_NODE_FIELD(expr);
}
static bool
-_equalColumnDef(ColumnDef *a, ColumnDef *b)
+_equalColumnDef(const ColumnDef *a, const ColumnDef *b)
{
COMPARE_STRING_FIELD(colname);
COMPARE_NODE_FIELD(typeName);
}
static bool
-_equalConstraint(Constraint *a, Constraint *b)
+_equalConstraint(const Constraint *a, const Constraint *b)
{
COMPARE_SCALAR_FIELD(contype);
COMPARE_STRING_FIELD(conname);
}
static bool
-_equalDefElem(DefElem *a, DefElem *b)
+_equalDefElem(const DefElem *a, const DefElem *b)
{
COMPARE_STRING_FIELD(defnamespace);
COMPARE_STRING_FIELD(defname);
}
static bool
-_equalLockingClause(LockingClause *a, LockingClause *b)
+_equalLockingClause(const LockingClause *a, const LockingClause *b)
{
COMPARE_NODE_FIELD(lockedRels);
COMPARE_SCALAR_FIELD(forUpdate);
}
static bool
-_equalRangeTblEntry(RangeTblEntry *a, RangeTblEntry *b)
+_equalRangeTblEntry(const RangeTblEntry *a, const RangeTblEntry *b)
{
COMPARE_SCALAR_FIELD(rtekind);
COMPARE_SCALAR_FIELD(relid);
}
static bool
-_equalSortGroupClause(SortGroupClause *a, SortGroupClause *b)
+_equalSortGroupClause(const SortGroupClause *a, const SortGroupClause *b)
{
COMPARE_SCALAR_FIELD(tleSortGroupRef);
COMPARE_SCALAR_FIELD(eqop);
}
static bool
-_equalWindowClause(WindowClause *a, WindowClause *b)
+_equalWindowClause(const WindowClause *a, const WindowClause *b)
{
COMPARE_STRING_FIELD(name);
COMPARE_STRING_FIELD(refname);
}
static bool
-_equalRowMarkClause(RowMarkClause *a, RowMarkClause *b)
+_equalRowMarkClause(const RowMarkClause *a, const RowMarkClause *b)
{
COMPARE_SCALAR_FIELD(rti);
COMPARE_SCALAR_FIELD(forUpdate);
}
static bool
-_equalWithClause(WithClause *a, WithClause *b)
+_equalWithClause(const WithClause *a, const WithClause *b)
{
COMPARE_NODE_FIELD(ctes);
COMPARE_SCALAR_FIELD(recursive);
}
static bool
-_equalCommonTableExpr(CommonTableExpr *a, CommonTableExpr *b)
+_equalCommonTableExpr(const CommonTableExpr *a, const CommonTableExpr *b)
{
COMPARE_STRING_FIELD(ctename);
COMPARE_NODE_FIELD(aliascolnames);
}
static bool
-_equalXmlSerialize(XmlSerialize *a, XmlSerialize *b)
+_equalXmlSerialize(const XmlSerialize *a, const XmlSerialize *b)
{
COMPARE_SCALAR_FIELD(xmloption);
COMPARE_NODE_FIELD(expr);
*/
static bool
-_equalList(List *a, List *b)
+_equalList(const List *a, const List *b)
{
- ListCell *item_a;
- ListCell *item_b;
+ const ListCell *item_a;
+ const ListCell *item_b;
/*
* Try to reject by simple scalar checks before grovelling through all the
*/
static bool
-_equalValue(Value *a, Value *b)
+_equalValue(const Value *a, const Value *b)
{
COMPARE_SCALAR_FIELD(type);
* returns whether two nodes are equal
*/
bool
-equal(void *a, void *b)
+equal(const void *a, const void *b)
{
bool retval;
* Check that the specified List is valid (so far as we can tell).
*/
static void
-check_list_invariants(List *list)
+check_list_invariants(const List *list)
{
if (list == NIL)
return;
* failure if there is no such cell.
*/
static ListCell *
-list_nth_cell(List *list, int n)
+list_nth_cell(const List *list, int n)
{
ListCell *match;
* specified list. (List elements begin at 0.)
*/
void *
-list_nth(List *list, int n)
+list_nth(const List *list, int n)
{
Assert(IsPointerList(list));
return lfirst(list_nth_cell(list, n));
* specified list.
*/
int
-list_nth_int(List *list, int n)
+list_nth_int(const List *list, int n)
{
Assert(IsIntegerList(list));
return lfirst_int(list_nth_cell(list, n));
* list.
*/
Oid
-list_nth_oid(List *list, int n)
+list_nth_oid(const List *list, int n)
{
Assert(IsOidList(list));
return lfirst_oid(list_nth_cell(list, n));
* Node as 'datum'.
*/
bool
-list_member(List *list, void *datum)
+list_member(const List *list, const void *datum)
{
- ListCell *cell;
+ const ListCell *cell;
Assert(IsPointerList(list));
check_list_invariants(list);
* determined by using simple pointer comparison.
*/
bool
-list_member_ptr(List *list, void *datum)
+list_member_ptr(const List *list, const void *datum)
{
- ListCell *cell;
+ const ListCell *cell;
Assert(IsPointerList(list));
check_list_invariants(list);
* Return true iff the integer 'datum' is a member of the list.
*/
bool
-list_member_int(List *list, int datum)
+list_member_int(const List *list, int datum)
{
- ListCell *cell;
+ const ListCell *cell;
Assert(IsIntegerList(list));
check_list_invariants(list);
* Return true iff the OID 'datum' is a member of the list.
*/
bool
-list_member_oid(List *list, Oid datum)
+list_member_oid(const List *list, Oid datum)
{
- ListCell *cell;
+ const ListCell *cell;
Assert(IsOidList(list));
check_list_invariants(list);
* performance bottleneck.
*/
List *
-list_union(List *list1, List *list2)
+list_union(const List *list1, const List *list2)
{
List *result;
- ListCell *cell;
+ const ListCell *cell;
Assert(IsPointerList(list1));
Assert(IsPointerList(list2));
* pointer comparison.
*/
List *
-list_union_ptr(List *list1, List *list2)
+list_union_ptr(const List *list1, const List *list2)
{
List *result;
- ListCell *cell;
+ const ListCell *cell;
Assert(IsPointerList(list1));
Assert(IsPointerList(list2));
* This variant of list_union() operates upon lists of integers.
*/
List *
-list_union_int(List *list1, List *list2)
+list_union_int(const List *list1, const List *list2)
{
List *result;
- ListCell *cell;
+ const ListCell *cell;
Assert(IsIntegerList(list1));
Assert(IsIntegerList(list2));
* This variant of list_union() operates upon lists of OIDs.
*/
List *
-list_union_oid(List *list1, List *list2)
+list_union_oid(const List *list1, const List *list2)
{
List *result;
- ListCell *cell;
+ const ListCell *cell;
Assert(IsOidList(list1));
Assert(IsOidList(list2));
* to in the result.
*/
List *
-list_intersection(List *list1, List *list2)
+list_intersection(const List *list1, const List *list2)
{
List *result;
- ListCell *cell;
+ const ListCell *cell;
if (list1 == NIL || list2 == NIL)
return NIL;
* membership via equal()
*/
List *
-list_difference(List *list1, List *list2)
+list_difference(const List *list1, const List *list2)
{
- ListCell *cell;
+ const ListCell *cell;
List *result = NIL;
Assert(IsPointerList(list1));
* simple pointer equality.
*/
List *
-list_difference_ptr(List *list1, List *list2)
+list_difference_ptr(const List *list1, const List *list2)
{
- ListCell *cell;
+ const ListCell *cell;
List *result = NIL;
Assert(IsPointerList(list1));
* This variant of list_difference() operates upon lists of integers.
*/
List *
-list_difference_int(List *list1, List *list2)
+list_difference_int(const List *list1, const List *list2)
{
- ListCell *cell;
+ const ListCell *cell;
List *result = NIL;
Assert(IsIntegerList(list1));
* This variant of list_difference() operates upon lists of OIDs.
*/
List *
-list_difference_oid(List *list1, List *list2)
+list_difference_oid(const List *list1, const List *list2)
{
- ListCell *cell;
+ const ListCell *cell;
List *result = NIL;
Assert(IsOidList(list1));
* Return a shallow copy of the specified list.
*/
List *
-list_copy(List *oldlist)
+list_copy(const List *oldlist)
{
List *newlist;
ListCell *newlist_prev;
* Return a shallow copy of the specified list, without the first N elements.
*/
List *
-list_copy_tail(List *oldlist, int nskip)
+list_copy_tail(const List *oldlist, int nskip)
{
List *newlist;
ListCell *newlist_prev;
#ifndef USE_INLINE
ListCell *
-list_head(List *l)
+list_head(const List *l)
{
return l ? l->head : NULL;
}
}
int
-list_length(List *l)
+list_length(const List *l)
{
return l ? l->length : 0;
}
* list_length() macro in order to avoid the overhead of a function
* call.
*/
-int length(List *list);
+int length(const List *list);
int
-length(List *list)
+length(const List *list)
{
return list_length(list);
}
* returns the Oid of the type of the expression's result.
*/
Oid
-exprType(Node *expr)
+exprType(const Node *expr)
{
Oid type;
switch (nodeTag(expr))
{
case T_Var:
- type = ((Var *) expr)->vartype;
+ type = ((const Var *) expr)->vartype;
break;
case T_Const:
- type = ((Const *) expr)->consttype;
+ type = ((const Const *) expr)->consttype;
break;
case T_Param:
- type = ((Param *) expr)->paramtype;
+ type = ((const Param *) expr)->paramtype;
break;
case T_Aggref:
- type = ((Aggref *) expr)->aggtype;
+ type = ((const Aggref *) expr)->aggtype;
break;
case T_WindowFunc:
- type = ((WindowFunc *) expr)->wintype;
+ type = ((const WindowFunc *) expr)->wintype;
break;
case T_ArrayRef:
{
- ArrayRef *arrayref = (ArrayRef *) expr;
+ const ArrayRef *arrayref = (const ArrayRef *) expr;
/* slice and/or store operations yield the array type */
if (arrayref->reflowerindexpr || arrayref->refassgnexpr)
}
break;
case T_FuncExpr:
- type = ((FuncExpr *) expr)->funcresulttype;
+ type = ((const FuncExpr *) expr)->funcresulttype;
break;
case T_NamedArgExpr:
- type = exprType((Node *) ((NamedArgExpr *) expr)->arg);
+ type = exprType((Node *) ((const NamedArgExpr *) expr)->arg);
break;
case T_OpExpr:
- type = ((OpExpr *) expr)->opresulttype;
+ type = ((const OpExpr *) expr)->opresulttype;
break;
case T_DistinctExpr:
- type = ((DistinctExpr *) expr)->opresulttype;
+ type = ((const DistinctExpr *) expr)->opresulttype;
break;
case T_NullIfExpr:
- type = ((NullIfExpr *) expr)->opresulttype;
+ type = ((const NullIfExpr *) expr)->opresulttype;
break;
case T_ScalarArrayOpExpr:
type = BOOLOID;
break;
case T_SubLink:
{
- SubLink *sublink = (SubLink *) expr;
+ const SubLink *sublink = (const SubLink *) expr;
if (sublink->subLinkType == EXPR_SUBLINK ||
sublink->subLinkType == ARRAY_SUBLINK)
break;
case T_SubPlan:
{
- SubPlan *subplan = (SubPlan *) expr;
+ const SubPlan *subplan = (const SubPlan *) expr;
if (subplan->subLinkType == EXPR_SUBLINK ||
subplan->subLinkType == ARRAY_SUBLINK)
break;
case T_AlternativeSubPlan:
{
- AlternativeSubPlan *asplan = (AlternativeSubPlan *) expr;
+ const AlternativeSubPlan *asplan = (const AlternativeSubPlan *) expr;
/* subplans should all return the same thing */
type = exprType((Node *) linitial(asplan->subplans));
}
break;
case T_FieldSelect:
- type = ((FieldSelect *) expr)->resulttype;
+ type = ((const FieldSelect *) expr)->resulttype;
break;
case T_FieldStore:
- type = ((FieldStore *) expr)->resulttype;
+ type = ((const FieldStore *) expr)->resulttype;
break;
case T_RelabelType:
- type = ((RelabelType *) expr)->resulttype;
+ type = ((const RelabelType *) expr)->resulttype;
break;
case T_CoerceViaIO:
- type = ((CoerceViaIO *) expr)->resulttype;
+ type = ((const CoerceViaIO *) expr)->resulttype;
break;
case T_ArrayCoerceExpr:
- type = ((ArrayCoerceExpr *) expr)->resulttype;
+ type = ((const ArrayCoerceExpr *) expr)->resulttype;
break;
case T_ConvertRowtypeExpr:
- type = ((ConvertRowtypeExpr *) expr)->resulttype;
+ type = ((const ConvertRowtypeExpr *) expr)->resulttype;
break;
case T_CollateExpr:
- type = exprType((Node *) ((CollateExpr *) expr)->arg);
+ type = exprType((Node *) ((const CollateExpr *) expr)->arg);
break;
case T_CaseExpr:
- type = ((CaseExpr *) expr)->casetype;
+ type = ((const CaseExpr *) expr)->casetype;
break;
case T_CaseTestExpr:
- type = ((CaseTestExpr *) expr)->typeId;
+ type = ((const CaseTestExpr *) expr)->typeId;
break;
case T_ArrayExpr:
- type = ((ArrayExpr *) expr)->array_typeid;
+ type = ((const ArrayExpr *) expr)->array_typeid;
break;
case T_RowExpr:
- type = ((RowExpr *) expr)->row_typeid;
+ type = ((const RowExpr *) expr)->row_typeid;
break;
case T_RowCompareExpr:
type = BOOLOID;
break;
case T_CoalesceExpr:
- type = ((CoalesceExpr *) expr)->coalescetype;
+ type = ((const CoalesceExpr *) expr)->coalescetype;
break;
case T_MinMaxExpr:
- type = ((MinMaxExpr *) expr)->minmaxtype;
+ type = ((const MinMaxExpr *) expr)->minmaxtype;
break;
case T_XmlExpr:
- if (((XmlExpr *) expr)->op == IS_DOCUMENT)
+ if (((const XmlExpr *) expr)->op == IS_DOCUMENT)
type = BOOLOID;
- else if (((XmlExpr *) expr)->op == IS_XMLSERIALIZE)
+ else if (((const XmlExpr *) expr)->op == IS_XMLSERIALIZE)
type = TEXTOID;
else
type = XMLOID;
type = BOOLOID;
break;
case T_CoerceToDomain:
- type = ((CoerceToDomain *) expr)->resulttype;
+ type = ((const CoerceToDomain *) expr)->resulttype;
break;
case T_CoerceToDomainValue:
- type = ((CoerceToDomainValue *) expr)->typeId;
+ type = ((const CoerceToDomainValue *) expr)->typeId;
break;
case T_SetToDefault:
- type = ((SetToDefault *) expr)->typeId;
+ type = ((const SetToDefault *) expr)->typeId;
break;
case T_CurrentOfExpr:
type = BOOLOID;
break;
case T_PlaceHolderVar:
- type = exprType((Node *) ((PlaceHolderVar *) expr)->phexpr);
+ type = exprType((Node *) ((const PlaceHolderVar *) expr)->phexpr);
break;
default:
elog(ERROR, "unrecognized node type: %d", (int) nodeTag(expr));
* if it can be determined. In many cases, it can't and we return -1.
*/
int32
-exprTypmod(Node *expr)
+exprTypmod(const Node *expr)
{
if (!expr)
return -1;
switch (nodeTag(expr))
{
case T_Var:
- return ((Var *) expr)->vartypmod;
+ return ((const Var *) expr)->vartypmod;
case T_Const:
- return ((Const *) expr)->consttypmod;
+ return ((const Const *) expr)->consttypmod;
case T_Param:
- return ((Param *) expr)->paramtypmod;
+ return ((const Param *) expr)->paramtypmod;
case T_ArrayRef:
/* typmod is the same for array or element */
- return ((ArrayRef *) expr)->reftypmod;
+ return ((const ArrayRef *) expr)->reftypmod;
case T_FuncExpr:
{
int32 coercedTypmod;
}
break;
case T_NamedArgExpr:
- return exprTypmod((Node *) ((NamedArgExpr *) expr)->arg);
+ return exprTypmod((Node *) ((const NamedArgExpr *) expr)->arg);
case T_NullIfExpr:
{
/*
* Result is either first argument or NULL, so we can report
* first argument's typmod if known.
*/
- NullIfExpr *nexpr = (NullIfExpr *) expr;
+ const NullIfExpr *nexpr = (const NullIfExpr *) expr;
return exprTypmod((Node *) linitial(nexpr->args));
}
break;
case T_SubLink:
{
- SubLink *sublink = (SubLink *) expr;
+ const SubLink *sublink = (const SubLink *) expr;
if (sublink->subLinkType == EXPR_SUBLINK ||
sublink->subLinkType == ARRAY_SUBLINK)
break;
case T_SubPlan:
{
- SubPlan *subplan = (SubPlan *) expr;
+ const SubPlan *subplan = (const SubPlan *) expr;
if (subplan->subLinkType == EXPR_SUBLINK ||
subplan->subLinkType == ARRAY_SUBLINK)
break;
case T_AlternativeSubPlan:
{
- AlternativeSubPlan *asplan = (AlternativeSubPlan *) expr;
+ const AlternativeSubPlan *asplan = (const AlternativeSubPlan *) expr;
/* subplans should all return the same thing */
return exprTypmod((Node *) linitial(asplan->subplans));
}
break;
case T_FieldSelect:
- return ((FieldSelect *) expr)->resulttypmod;
+ return ((const FieldSelect *) expr)->resulttypmod;
case T_RelabelType:
- return ((RelabelType *) expr)->resulttypmod;
+ return ((const RelabelType *) expr)->resulttypmod;
case T_ArrayCoerceExpr:
- return ((ArrayCoerceExpr *) expr)->resulttypmod;
+ return ((const ArrayCoerceExpr *) expr)->resulttypmod;
case T_CollateExpr:
- return exprTypmod((Node *) ((CollateExpr *) expr)->arg);
+ return exprTypmod((Node *) ((const CollateExpr *) expr)->arg);
case T_CaseExpr:
{
/*
* If all the alternatives agree on type/typmod, return that
* typmod, else use -1
*/
- CaseExpr *cexpr = (CaseExpr *) expr;
+ const CaseExpr *cexpr = (const CaseExpr *) expr;
Oid casetype = cexpr->casetype;
int32 typmod;
ListCell *arg;
}
break;
case T_CaseTestExpr:
- return ((CaseTestExpr *) expr)->typeMod;
+ return ((const CaseTestExpr *) expr)->typeMod;
case T_ArrayExpr:
{
/*
* If all the elements agree on type/typmod, return that
* typmod, else use -1
*/
- ArrayExpr *arrayexpr = (ArrayExpr *) expr;
+ const ArrayExpr *arrayexpr = (const ArrayExpr *) expr;
Oid commontype;
int32 typmod;
ListCell *elem;
* If all the alternatives agree on type/typmod, return that
* typmod, else use -1
*/
- CoalesceExpr *cexpr = (CoalesceExpr *) expr;
+ const CoalesceExpr *cexpr = (const CoalesceExpr *) expr;
Oid coalescetype = cexpr->coalescetype;
int32 typmod;
ListCell *arg;
* If all the alternatives agree on type/typmod, return that
* typmod, else use -1
*/
- MinMaxExpr *mexpr = (MinMaxExpr *) expr;
+ const MinMaxExpr *mexpr = (const MinMaxExpr *) expr;
Oid minmaxtype = mexpr->minmaxtype;
int32 typmod;
ListCell *arg;
}
break;
case T_CoerceToDomain:
- return ((CoerceToDomain *) expr)->resulttypmod;
+ return ((const CoerceToDomain *) expr)->resulttypmod;
case T_CoerceToDomainValue:
- return ((CoerceToDomainValue *) expr)->typeMod;
+ return ((const CoerceToDomainValue *) expr)->typeMod;
case T_SetToDefault:
- return ((SetToDefault *) expr)->typeMod;
+ return ((const SetToDefault *) expr)->typeMod;
case T_PlaceHolderVar:
- return exprTypmod((Node *) ((PlaceHolderVar *) expr)->phexpr);
+ return exprTypmod((Node *) ((const PlaceHolderVar *) expr)->phexpr);
default:
break;
}
* length coercion by this routine.
*/
bool
-exprIsLengthCoercion(Node *expr, int32 *coercedTypmod)
+exprIsLengthCoercion(const Node *expr, int32 *coercedTypmod)
{
if (coercedTypmod != NULL)
*coercedTypmod = -1; /* default result on failure */
*/
if (expr && IsA(expr, FuncExpr))
{
- FuncExpr *func = (FuncExpr *) expr;
+ const FuncExpr *func = (const FuncExpr *) expr;
int nargs;
Const *second_arg;
if (expr && IsA(expr, ArrayCoerceExpr))
{
- ArrayCoerceExpr *acoerce = (ArrayCoerceExpr *) expr;
+ const ArrayCoerceExpr *acoerce = (const ArrayCoerceExpr *) expr;
/* It's not a length coercion unless there's a nondefault typmod */
if (acoerce->resulttypmod < 0)
* or vice versa, the two are different.
*/
Oid
-exprCollation(Node *expr)
+exprCollation(const Node *expr)
{
Oid coll;
switch (nodeTag(expr))
{
case T_Var:
- coll = ((Var *) expr)->varcollid;
+ coll = ((const Var *) expr)->varcollid;
break;
case T_Const:
- coll = ((Const *) expr)->constcollid;
+ coll = ((const Const *) expr)->constcollid;
break;
case T_Param:
- coll = ((Param *) expr)->paramcollid;
+ coll = ((const Param *) expr)->paramcollid;
break;
case T_Aggref:
- coll = ((Aggref *) expr)->aggcollid;
+ coll = ((const Aggref *) expr)->aggcollid;
break;
case T_WindowFunc:
- coll = ((WindowFunc *) expr)->wincollid;
+ coll = ((const WindowFunc *) expr)->wincollid;
break;
case T_ArrayRef:
- coll = ((ArrayRef *) expr)->refcollid;
+ coll = ((const ArrayRef *) expr)->refcollid;
break;
case T_FuncExpr:
- coll = ((FuncExpr *) expr)->funccollid;
+ coll = ((const FuncExpr *) expr)->funccollid;
break;
case T_NamedArgExpr:
- coll = exprCollation((Node *) ((NamedArgExpr *) expr)->arg);
+ coll = exprCollation((Node *) ((const NamedArgExpr *) expr)->arg);
break;
case T_OpExpr:
- coll = ((OpExpr *) expr)->opcollid;
+ coll = ((const OpExpr *) expr)->opcollid;
break;
case T_DistinctExpr:
- coll = ((DistinctExpr *) expr)->opcollid;
+ coll = ((const DistinctExpr *) expr)->opcollid;
break;
case T_NullIfExpr:
- coll = ((NullIfExpr *) expr)->opcollid;
+ coll = ((const NullIfExpr *) expr)->opcollid;
break;
case T_ScalarArrayOpExpr:
coll = InvalidOid; /* result is always boolean */
break;
case T_SubLink:
{
- SubLink *sublink = (SubLink *) expr;
+ const SubLink *sublink = (const SubLink *) expr;
if (sublink->subLinkType == EXPR_SUBLINK ||
sublink->subLinkType == ARRAY_SUBLINK)
break;
case T_SubPlan:
{
- SubPlan *subplan = (SubPlan *) expr;
+ const SubPlan *subplan = (const SubPlan *) expr;
if (subplan->subLinkType == EXPR_SUBLINK ||
subplan->subLinkType == ARRAY_SUBLINK)
break;
case T_AlternativeSubPlan:
{
- AlternativeSubPlan *asplan = (AlternativeSubPlan *) expr;
+ const AlternativeSubPlan *asplan = (const AlternativeSubPlan *) expr;
/* subplans should all return the same thing */
coll = exprCollation((Node *) linitial(asplan->subplans));
}
break;
case T_FieldSelect:
- coll = ((FieldSelect *) expr)->resultcollid;
+ coll = ((const FieldSelect *) expr)->resultcollid;
break;
case T_FieldStore:
coll = InvalidOid; /* result is always composite */
break;
case T_RelabelType:
- coll = ((RelabelType *) expr)->resultcollid;
+ coll = ((const RelabelType *) expr)->resultcollid;
break;
case T_CoerceViaIO:
- coll = ((CoerceViaIO *) expr)->resultcollid;
+ coll = ((const CoerceViaIO *) expr)->resultcollid;
break;
case T_ArrayCoerceExpr:
- coll = ((ArrayCoerceExpr *) expr)->resultcollid;
+ coll = ((const ArrayCoerceExpr *) expr)->resultcollid;
break;
case T_ConvertRowtypeExpr:
coll = InvalidOid; /* result is always composite */
break;
case T_CollateExpr:
- coll = ((CollateExpr *) expr)->collOid;
+ coll = ((const CollateExpr *) expr)->collOid;
break;
case T_CaseExpr:
- coll = ((CaseExpr *) expr)->casecollid;
+ coll = ((const CaseExpr *) expr)->casecollid;
break;
case T_CaseTestExpr:
- coll = ((CaseTestExpr *) expr)->collation;
+ coll = ((const CaseTestExpr *) expr)->collation;
break;
case T_ArrayExpr:
- coll = ((ArrayExpr *) expr)->array_collid;
+ coll = ((const ArrayExpr *) expr)->array_collid;
break;
case T_RowExpr:
coll = InvalidOid; /* result is always composite */
coll = InvalidOid; /* result is always boolean */
break;
case T_CoalesceExpr:
- coll = ((CoalesceExpr *) expr)->coalescecollid;
+ coll = ((const CoalesceExpr *) expr)->coalescecollid;
break;
case T_MinMaxExpr:
- coll = ((MinMaxExpr *) expr)->minmaxcollid;
+ coll = ((const MinMaxExpr *) expr)->minmaxcollid;
break;
case T_XmlExpr:
* collation is always default. The other cases return boolean or
* XML, which are non-collatable.
*/
- if (((XmlExpr *) expr)->op == IS_XMLSERIALIZE)
+ if (((const XmlExpr *) expr)->op == IS_XMLSERIALIZE)
coll = DEFAULT_COLLATION_OID;
else
coll = InvalidOid;
coll = InvalidOid; /* result is always boolean */
break;
case T_CoerceToDomain:
- coll = ((CoerceToDomain *) expr)->resultcollid;
+ coll = ((const CoerceToDomain *) expr)->resultcollid;
break;
case T_CoerceToDomainValue:
- coll = ((CoerceToDomainValue *) expr)->collation;
+ coll = ((const CoerceToDomainValue *) expr)->collation;
break;
case T_SetToDefault:
- coll = ((SetToDefault *) expr)->collation;
+ coll = ((const SetToDefault *) expr)->collation;
break;
case T_CurrentOfExpr:
coll = InvalidOid; /* result is always boolean */
break;
case T_PlaceHolderVar:
- coll = exprCollation((Node *) ((PlaceHolderVar *) expr)->phexpr);
+ coll = exprCollation((Node *) ((const PlaceHolderVar *) expr)->phexpr);
break;
default:
elog(ERROR, "unrecognized node type: %d", (int) nodeTag(expr));
* Result is InvalidOid if the node type doesn't store this information.
*/
Oid
-exprInputCollation(Node *expr)
+exprInputCollation(const Node *expr)
{
Oid coll;
switch (nodeTag(expr))
{
case T_Aggref:
- coll = ((Aggref *) expr)->inputcollid;
+ coll = ((const Aggref *) expr)->inputcollid;
break;
case T_WindowFunc:
- coll = ((WindowFunc *) expr)->inputcollid;
+ coll = ((const WindowFunc *) expr)->inputcollid;
break;
case T_FuncExpr:
- coll = ((FuncExpr *) expr)->inputcollid;
+ coll = ((const FuncExpr *) expr)->inputcollid;
break;
case T_OpExpr:
- coll = ((OpExpr *) expr)->inputcollid;
+ coll = ((const OpExpr *) expr)->inputcollid;
break;
case T_DistinctExpr:
- coll = ((DistinctExpr *) expr)->inputcollid;
+ coll = ((const DistinctExpr *) expr)->inputcollid;
break;
case T_NullIfExpr:
- coll = ((NullIfExpr *) expr)->inputcollid;
+ coll = ((const NullIfExpr *) expr)->inputcollid;
break;
case T_ScalarArrayOpExpr:
- coll = ((ScalarArrayOpExpr *) expr)->inputcollid;
+ coll = ((const ScalarArrayOpExpr *) expr)->inputcollid;
break;
case T_MinMaxExpr:
- coll = ((MinMaxExpr *) expr)->inputcollid;
+ coll = ((const MinMaxExpr *) expr)->inputcollid;
break;
default:
coll = InvalidOid;
* known and unknown locations in a tree.
*/
int
-exprLocation(Node *expr)
+exprLocation(const Node *expr)
{
int loc;
switch (nodeTag(expr))
{
case T_RangeVar:
- loc = ((RangeVar *) expr)->location;
+ loc = ((const RangeVar *) expr)->location;
break;
case T_Var:
- loc = ((Var *) expr)->location;
+ loc = ((const Var *) expr)->location;
break;
case T_Const:
- loc = ((Const *) expr)->location;
+ loc = ((const Const *) expr)->location;
break;
case T_Param:
- loc = ((Param *) expr)->location;
+ loc = ((const Param *) expr)->location;
break;
case T_Aggref:
/* function name should always be the first thing */
- loc = ((Aggref *) expr)->location;
+ loc = ((const Aggref *) expr)->location;
break;
case T_WindowFunc:
/* function name should always be the first thing */
- loc = ((WindowFunc *) expr)->location;
+ loc = ((const WindowFunc *) expr)->location;
break;
case T_ArrayRef:
/* just use array argument's location */
- loc = exprLocation((Node *) ((ArrayRef *) expr)->refexpr);
+ loc = exprLocation((Node *) ((const ArrayRef *) expr)->refexpr);
break;
case T_FuncExpr:
{
- FuncExpr *fexpr = (FuncExpr *) expr;
+ const FuncExpr *fexpr = (const FuncExpr *) expr;
/* consider both function name and leftmost arg */
loc = leftmostLoc(fexpr->location,
break;
case T_NamedArgExpr:
{
- NamedArgExpr *na = (NamedArgExpr *) expr;
+ const NamedArgExpr *na = (const NamedArgExpr *) expr;
/* consider both argument name and value */
loc = leftmostLoc(na->location,
case T_DistinctExpr: /* struct-equivalent to OpExpr */
case T_NullIfExpr: /* struct-equivalent to OpExpr */
{
- OpExpr *opexpr = (OpExpr *) expr;
+ const OpExpr *opexpr = (const OpExpr *) expr;
/* consider both operator name and leftmost arg */
loc = leftmostLoc(opexpr->location,
break;
case T_ScalarArrayOpExpr:
{
- ScalarArrayOpExpr *saopexpr = (ScalarArrayOpExpr *) expr;
+ const ScalarArrayOpExpr *saopexpr = (const ScalarArrayOpExpr *) expr;
/* consider both operator name and leftmost arg */
loc = leftmostLoc(saopexpr->location,
break;
case T_BoolExpr:
{
- BoolExpr *bexpr = (BoolExpr *) expr;
+ const BoolExpr *bexpr = (const BoolExpr *) expr;
/*
* Same as above, to handle either NOT or AND/OR. We can't
break;
case T_SubLink:
{
- SubLink *sublink = (SubLink *) expr;
+ const SubLink *sublink = (const SubLink *) expr;
/* check the testexpr, if any, and the operator/keyword */
loc = leftmostLoc(exprLocation(sublink->testexpr),
break;
case T_FieldSelect:
/* just use argument's location */
- loc = exprLocation((Node *) ((FieldSelect *) expr)->arg);
+ loc = exprLocation((Node *) ((const FieldSelect *) expr)->arg);
break;
case T_FieldStore:
/* just use argument's location */
- loc = exprLocation((Node *) ((FieldStore *) expr)->arg);
+ loc = exprLocation((Node *) ((const FieldStore *) expr)->arg);
break;
case T_RelabelType:
{
- RelabelType *rexpr = (RelabelType *) expr;
+ const RelabelType *rexpr = (const RelabelType *) expr;
/* Much as above */
loc = leftmostLoc(rexpr->location,
break;
case T_CoerceViaIO:
{
- CoerceViaIO *cexpr = (CoerceViaIO *) expr;
+ const CoerceViaIO *cexpr = (const CoerceViaIO *) expr;
/* Much as above */
loc = leftmostLoc(cexpr->location,
break;
case T_ArrayCoerceExpr:
{
- ArrayCoerceExpr *cexpr = (ArrayCoerceExpr *) expr;
+ const ArrayCoerceExpr *cexpr = (const ArrayCoerceExpr *) expr;
/* Much as above */
loc = leftmostLoc(cexpr->location,
break;
case T_ConvertRowtypeExpr:
{
- ConvertRowtypeExpr *cexpr = (ConvertRowtypeExpr *) expr;
+ const ConvertRowtypeExpr *cexpr = (const ConvertRowtypeExpr *) expr;
/* Much as above */
loc = leftmostLoc(cexpr->location,
break;
case T_CollateExpr:
/* just use argument's location */
- loc = exprLocation((Node *) ((CollateExpr *) expr)->arg);
+ loc = exprLocation((Node *) ((const CollateExpr *) expr)->arg);
break;
case T_CaseExpr:
/* CASE keyword should always be the first thing */
- loc = ((CaseExpr *) expr)->location;
+ loc = ((const CaseExpr *) expr)->location;
break;
case T_CaseWhen:
/* WHEN keyword should always be the first thing */
- loc = ((CaseWhen *) expr)->location;
+ loc = ((const CaseWhen *) expr)->location;
break;
case T_ArrayExpr:
/* the location points at ARRAY or [, which must be leftmost */
- loc = ((ArrayExpr *) expr)->location;
+ loc = ((const ArrayExpr *) expr)->location;
break;
case T_RowExpr:
/* the location points at ROW or (, which must be leftmost */
- loc = ((RowExpr *) expr)->location;
+ loc = ((const RowExpr *) expr)->location;
break;
case T_RowCompareExpr:
/* just use leftmost argument's location */
- loc = exprLocation((Node *) ((RowCompareExpr *) expr)->largs);
+ loc = exprLocation((Node *) ((const RowCompareExpr *) expr)->largs);
break;
case T_CoalesceExpr:
/* COALESCE keyword should always be the first thing */
- loc = ((CoalesceExpr *) expr)->location;
+ loc = ((const CoalesceExpr *) expr)->location;
break;
case T_MinMaxExpr:
/* GREATEST/LEAST keyword should always be the first thing */
- loc = ((MinMaxExpr *) expr)->location;
+ loc = ((const MinMaxExpr *) expr)->location;
break;
case T_XmlExpr:
{
- XmlExpr *xexpr = (XmlExpr *) expr;
+ const XmlExpr *xexpr = (const XmlExpr *) expr;
/* consider both function name and leftmost arg */
loc = leftmostLoc(xexpr->location,
break;
case T_NullTest:
/* just use argument's location */
- loc = exprLocation((Node *) ((NullTest *) expr)->arg);
+ loc = exprLocation((Node *) ((const NullTest *) expr)->arg);
break;
case T_BooleanTest:
/* just use argument's location */
- loc = exprLocation((Node *) ((BooleanTest *) expr)->arg);
+ loc = exprLocation((Node *) ((const BooleanTest *) expr)->arg);
break;
case T_CoerceToDomain:
{
- CoerceToDomain *cexpr = (CoerceToDomain *) expr;
+ const CoerceToDomain *cexpr = (const CoerceToDomain *) expr;
/* Much as above */
loc = leftmostLoc(cexpr->location,
}
break;
case T_CoerceToDomainValue:
- loc = ((CoerceToDomainValue *) expr)->location;
+ loc = ((const&nb