* _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 CoerceToDomainValue *) expr)->location;
break;
case T_SetToDefault:
- loc = ((SetToDefault *) expr)->location;
+ loc = ((const SetToDefault *) expr)->location;
break;
case T_TargetEntry:
/* just use argument's location */
- loc = exprLocation((Node *) ((TargetEntry *) expr)->expr);
+ loc = exprLocation((Node *) ((const TargetEntry *) expr)->expr);
break;
case T_IntoClause:
/* use the contained RangeVar's location --- close enough */
- loc = exprLocation((Node *) ((IntoClause *) expr)->rel);
+ loc = exprLocation((Node *) ((const IntoClause *) expr)->rel);
break;
case T_List:
{
ListCell *lc;
loc = -1; /* just to suppress compiler warning */
- foreach(lc, (List *) expr)
+ foreach(lc, (const List *) expr)
{
loc = exprLocation((Node *) lfirst(lc));
if (loc >= 0)
break;
case T_A_Expr:
{
- A_Expr *aexpr = (A_Expr *) expr;
+ const A_Expr *aexpr = (const A_Expr *) expr;
/* use leftmost of operator or left operand (if any) */
/* we assume right operand can't be to left of operator */
}
break;
case T_ColumnRef:
- loc = ((ColumnRef *) expr)->location;
+ loc = ((const ColumnRef *) expr)->location;
break;
case T_ParamRef:
- loc = ((ParamRef *) expr)->location;
+ loc = ((const ParamRef *) expr)->location;
break;
case T_A_Const:
- loc = ((A_Const *) expr)->location;
+ loc = ((const A_Const *) expr)->location;
break;
case T_FuncCall:
{
- FuncCall *fc = (FuncCall *) expr;
+ const FuncCall *fc = (const FuncCall *) expr;
/* consider both function name and leftmost arg */
/* (we assume any ORDER BY nodes must be to right of name) */
break;
case T_A_ArrayExpr:
/* the location points at ARRAY or [, which must be leftmost */
- loc = ((A_ArrayExpr *) expr)->location;
+ loc = ((const A_ArrayExpr *) expr)->location;
break;
case T_ResTarget:
/* we need not examine the contained expression (if any) */
- loc = ((ResTarget *) expr)->location;
+ loc = ((const ResTarget *) expr)->location;
break;
case T_TypeCast:
{
- TypeCast *tc = (TypeCast *) expr;
+ const TypeCast *tc = (const TypeCast *) expr;
/*
* This could represent CAST(), ::, or TypeName 'literal', so
break;
case T_CollateClause:
/* just use argument's location */
- loc = exprLocation(((CollateClause *) expr)->arg);
+ loc = exprLocation(((const CollateClause *) expr)->arg);
break;
case T_SortBy:
/* just use argument's location (ignore operator, if any) */
- loc = exprLocation(((SortBy *) expr)->node);
+ loc = exprLocation(((const SortBy *) expr)->node);
break;
case T_WindowDef:
- loc = ((WindowDef *) expr)->location;
+ loc = ((const WindowDef *) expr)->location;
break;
case T_TypeName:
- loc = ((TypeName *) expr)->location;
+ loc = ((const TypeName *) expr)->location;
break;
case T_Constraint:
- loc = ((Constraint *) expr)->location;
+ loc = ((const Constraint *) expr)->location;
break;
case T_XmlSerialize:
/* XMLSERIALIZE keyword should always be the first thing */
- loc = ((XmlSerialize *) expr)->location;
+ loc = ((const XmlSerialize *) expr)->location;
break;
case T_WithClause:
- loc = ((WithClause *) expr)->location;
+ loc = ((const WithClause *) expr)->location;
break;
case T_CommonTableExpr:
- loc = ((CommonTableExpr *) expr)->location;
+ loc = ((const CommonTableExpr *) expr)->location;
break;
case T_PlaceHolderVar:
/* just use argument's location */
- loc = exprLocation((Node *) ((PlaceHolderVar *) expr)->phexpr);
+ loc = exprLocation((Node *) ((const PlaceHolderVar *) expr)->phexpr);
break;
default:
/* for any other node type it's just unknown... */
#define booltostr(x) ((x) ? "true" : "false")
-static void _outNode(StringInfo str, void *obj);
+static void _outNode(StringInfo str, const void *obj);
/*
* If a null or empty string is given, it is encoded as "<>".
*/
static void
-_outToken(StringInfo str, char *s)
+_outToken(StringInfo str, const char *s)
{
if (s == NULL || *s == '\0')
{
}
static void
-_outList(StringInfo str, List *node)
+_outList(StringInfo str, const List *node)
{
- ListCell *lc;
+ const ListCell *lc;
appendStringInfoChar(str, '(');
* Note: the output format is "(b int int ...)", similar to an integer List.
*/
static void
-_outBitmapset(StringInfo str, Bitmapset *bms)
+_outBitmapset(StringInfo str, const Bitmapset *bms)
{
Bitmapset *tmpset;
int x;
*/
static void
-_outPlannedStmt(StringInfo str, PlannedStmt *node)
+_outPlannedStmt(StringInfo str, const PlannedStmt *node)
{
WRITE_NODE_TYPE("PLANNEDSTMT");
* print the basic stuff of all nodes that inherit from Plan
*/
static void
-_outPlanInfo(StringInfo str, Plan *node)
+_outPlanInfo(StringInfo str, const Plan *node)
{
WRITE_FLOAT_FIELD(startup_cost, "%.2f");
WRITE_FLOAT_FIELD(total_cost, "%.2f");
* print the basic stuff of all nodes that inherit from Scan
*/
static void
-_outScanInfo(StringInfo str, Scan *node)
+_outScanInfo(StringInfo str, const Scan *node)
{
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_UINT_FIELD(scanrelid);
}
* print the basic stuff of all nodes that inherit from Join
*/
static void
-_outJoinPlanInfo(StringInfo str, Join *node)
+_outJoinPlanInfo(StringInfo str, const Join *node)
{
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_ENUM_FIELD(jointype, JoinType);
WRITE_NODE_FIELD(joinqual);
static void
-_outPlan(StringInfo str, Plan *node)
+_outPlan(StringInfo str, const Plan *node)
{
WRITE_NODE_TYPE("PLAN");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
}
static void
-_outResult(StringInfo str, Result *node)
+_outResult(StringInfo str, const Result *node)
{
WRITE_NODE_TYPE("RESULT");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_NODE_FIELD(resconstantqual);
}
static void
-_outModifyTable(StringInfo str, ModifyTable *node)
+_outModifyTable(StringInfo str, const ModifyTable *node)
{
WRITE_NODE_TYPE("MODIFYTABLE");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_ENUM_FIELD(operation, CmdType);
WRITE_BOOL_FIELD(canSetTag);
}
static void
-_outAppend(StringInfo str, Append *node)
+_outAppend(StringInfo str, const Append *node)
{
WRITE_NODE_TYPE("APPEND");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_NODE_FIELD(appendplans);
}
static void
-_outMergeAppend(StringInfo str, MergeAppend *node)
+_outMergeAppend(StringInfo str, const MergeAppend *node)
{
int i;
WRITE_NODE_TYPE("MERGEAPPEND");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_NODE_FIELD(mergeplans);
}
static void
-_outRecursiveUnion(StringInfo str, RecursiveUnion *node)
+_outRecursiveUnion(StringInfo str, const RecursiveUnion *node)
{
int i;
WRITE_NODE_TYPE("RECURSIVEUNION");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_INT_FIELD(wtParam);
WRITE_INT_FIELD(numCols);
}
static void
-_outBitmapAnd(StringInfo str, BitmapAnd *node)
+_outBitmapAnd(StringInfo str, const BitmapAnd *node)
{
WRITE_NODE_TYPE("BITMAPAND");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_NODE_FIELD(bitmapplans);
}
static void
-_outBitmapOr(StringInfo str, BitmapOr *node)
+_outBitmapOr(StringInfo str, const BitmapOr *node)
{
WRITE_NODE_TYPE("BITMAPOR");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_NODE_FIELD(bitmapplans);
}
static void
-_outScan(StringInfo str, Scan *node)
+_outScan(StringInfo str, const Scan *node)
{
WRITE_NODE_TYPE("SCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, node);
}
static void
-_outSeqScan(StringInfo str, SeqScan *node)
+_outSeqScan(StringInfo str, const SeqScan *node)
{
WRITE_NODE_TYPE("SEQSCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, (const Scan *) node);
}
static void
-_outIndexScan(StringInfo str, IndexScan *node)
+_outIndexScan(StringInfo str, const IndexScan *node)
{
WRITE_NODE_TYPE("INDEXSCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, (const Scan *) node);
WRITE_OID_FIELD(indexid);
WRITE_NODE_FIELD(indexqual);
}
static void
-_outIndexOnlyScan(StringInfo str, IndexOnlyScan *node)
+_outIndexOnlyScan(StringInfo str, const IndexOnlyScan *node)
{
WRITE_NODE_TYPE("INDEXONLYSCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, (const Scan *) node);
WRITE_OID_FIELD(indexid);
WRITE_NODE_FIELD(indexqual);
}
static void
-_outBitmapIndexScan(StringInfo str, BitmapIndexScan *node)
+_outBitmapIndexScan(StringInfo str, const BitmapIndexScan *node)
{
WRITE_NODE_TYPE("BITMAPINDEXSCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, (const Scan *) node);
WRITE_OID_FIELD(indexid);
WRITE_NODE_FIELD(indexqual);
}
static void
-_outBitmapHeapScan(StringInfo str, BitmapHeapScan *node)
+_outBitmapHeapScan(StringInfo str, const BitmapHeapScan *node)
{
WRITE_NODE_TYPE("BITMAPHEAPSCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, (const Scan *) node);
WRITE_NODE_FIELD(bitmapqualorig);
}
static void
-_outTidScan(StringInfo str, TidScan *node)
+_outTidScan(StringInfo str, const TidScan *node)
{
WRITE_NODE_TYPE("TIDSCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, (const Scan *) node);
WRITE_NODE_FIELD(tidquals);
}
static void
-_outSubqueryScan(StringInfo str, SubqueryScan *node)
+_outSubqueryScan(StringInfo str, const SubqueryScan *node)
{
WRITE_NODE_TYPE("SUBQUERYSCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, (const Scan *) node);
WRITE_NODE_FIELD(subplan);
}
static void
-_outFunctionScan(StringInfo str, FunctionScan *node)
+_outFunctionScan(StringInfo str, const FunctionScan *node)
{
WRITE_NODE_TYPE("FUNCTIONSCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, (const Scan *) node);
WRITE_NODE_FIELD(funcexpr);
WRITE_NODE_FIELD(funccolnames);
}
static void
-_outValuesScan(StringInfo str, ValuesScan *node)
+_outValuesScan(StringInfo str, const ValuesScan *node)
{
WRITE_NODE_TYPE("VALUESSCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, (const Scan *) node);
WRITE_NODE_FIELD(values_lists);
}
static void
-_outCteScan(StringInfo str, CteScan *node)
+_outCteScan(StringInfo str, const CteScan *node)
{
WRITE_NODE_TYPE("CTESCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, (const Scan *) node);
WRITE_INT_FIELD(ctePlanId);
WRITE_INT_FIELD(cteParam);
}
static void
-_outWorkTableScan(StringInfo str, WorkTableScan *node)
+_outWorkTableScan(StringInfo str, const WorkTableScan *node)
{
WRITE_NODE_TYPE("WORKTABLESCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, (const Scan *) node);
WRITE_INT_FIELD(wtParam);
}
static void
-_outForeignScan(StringInfo str, ForeignScan *node)
+_outForeignScan(StringInfo str, const ForeignScan *node)
{
WRITE_NODE_TYPE("FOREIGNSCAN");
- _outScanInfo(str, (Scan *) node);
+ _outScanInfo(str, (const Scan *) node);
WRITE_BOOL_FIELD(fsSystemCol);
WRITE_NODE_FIELD(fdwplan);
}
static void
-_outFdwPlan(StringInfo str, FdwPlan *node)
+_outFdwPlan(StringInfo str, const FdwPlan *node)
{
WRITE_NODE_TYPE("FDWPLAN");
}
static void
-_outJoin(StringInfo str, Join *node)
+_outJoin(StringInfo str, const Join *node)
{
WRITE_NODE_TYPE("JOIN");
- _outJoinPlanInfo(str, (Join *) node);
+ _outJoinPlanInfo(str, (const Join *) node);
}
static void
-_outNestLoop(StringInfo str, NestLoop *node)
+_outNestLoop(StringInfo str, const NestLoop *node)
{
WRITE_NODE_TYPE("NESTLOOP");
- _outJoinPlanInfo(str, (Join *) node);
+ _outJoinPlanInfo(str, (const Join *) node);
WRITE_NODE_FIELD(nestParams);
}
static void
-_outMergeJoin(StringInfo str, MergeJoin *node)
+_outMergeJoin(StringInfo str, const MergeJoin *node)
{
int numCols;
int i;
WRITE_NODE_TYPE("MERGEJOIN");
- _outJoinPlanInfo(str, (Join *) node);
+ _outJoinPlanInfo(str, (const Join *) node);
WRITE_NODE_FIELD(mergeclauses);
}
static void
-_outHashJoin(StringInfo str, HashJoin *node)
+_outHashJoin(StringInfo str, const HashJoin *node)
{
WRITE_NODE_TYPE("HASHJOIN");
- _outJoinPlanInfo(str, (Join *) node);
+ _outJoinPlanInfo(str, (const Join *) node);
WRITE_NODE_FIELD(hashclauses);
}
static void
-_outAgg(StringInfo str, Agg *node)
+_outAgg(StringInfo str, const Agg *node)
{
int i;
WRITE_NODE_TYPE("AGG");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_ENUM_FIELD(aggstrategy, AggStrategy);
WRITE_INT_FIELD(numCols);
}
static void
-_outWindowAgg(StringInfo str, WindowAgg *node)
+_outWindowAgg(StringInfo str, const WindowAgg *node)
{
int i;
WRITE_NODE_TYPE("WINDOWAGG");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_UINT_FIELD(winref);
WRITE_INT_FIELD(partNumCols);
}
static void
-_outGroup(StringInfo str, Group *node)
+_outGroup(StringInfo str, const Group *node)
{
int i;
WRITE_NODE_TYPE("GROUP");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_INT_FIELD(numCols);
}
static void
-_outMaterial(StringInfo str, Material *node)
+_outMaterial(StringInfo str, const Material *node)
{
WRITE_NODE_TYPE("MATERIAL");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
}
static void
-_outSort(StringInfo str, Sort *node)
+_outSort(StringInfo str, const Sort *node)
{
int i;
WRITE_NODE_TYPE("SORT");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_INT_FIELD(numCols);
}
static void
-_outUnique(StringInfo str, Unique *node)
+_outUnique(StringInfo str, const Unique *node)
{
int i;
WRITE_NODE_TYPE("UNIQUE");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_INT_FIELD(numCols);
}
static void
-_outHash(StringInfo str, Hash *node)
+_outHash(StringInfo str, const Hash *node)
{
WRITE_NODE_TYPE("HASH");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_OID_FIELD(skewTable);
WRITE_INT_FIELD(skewColumn);
}
static void
-_outSetOp(StringInfo str, SetOp *node)
+_outSetOp(StringInfo str, const SetOp *node)
{
int i;
WRITE_NODE_TYPE("SETOP");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_ENUM_FIELD(cmd, SetOpCmd);
WRITE_ENUM_FIELD(strategy, SetOpStrategy);
}
static void
-_outLockRows(StringInfo str, LockRows *node)
+_outLockRows(StringInfo str, const LockRows *node)
{
WRITE_NODE_TYPE("LOCKROWS");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_NODE_FIELD(rowMarks);
WRITE_INT_FIELD(epqParam);
}
static void
-_outLimit(StringInfo str, Limit *node)
+_outLimit(StringInfo str, const Limit *node)
{
WRITE_NODE_TYPE("LIMIT");
- _outPlanInfo(str, (Plan *) node);
+ _outPlanInfo(str, (const Plan *) node);
WRITE_NODE_FIELD(limitOffset);
WRITE_NODE_FIELD(limitCount);
}
static void
-_outNestLoopParam(StringInfo str, NestLoopParam *node)
+_outNestLoopParam(StringInfo str, const NestLoopParam *node)
{
WRITE_NODE_TYPE("NESTLOOPPARAM");
}
static void
-_outPlanRowMark(StringInfo str, PlanRowMark *node)
+_outPlanRowMark(StringInfo str, const PlanRowMark *node)
{
WRITE_NODE_TYPE("PLANROWMARK");
}
static void
-_outPlanInvalItem(StringInfo str, PlanInvalItem *node)
+_outPlanInvalItem(StringInfo str, const PlanInvalItem *node)
{
WRITE_NODE_TYPE("PLANINVALITEM");
*****************************************************************************/
static void
-_outAlias(StringInfo str, Alias *node)
+_outAlias(StringInfo str, const Alias *node)
{
WRITE_NODE_TYPE("ALIAS");
}
static void
-_outRangeVar(StringInfo str, RangeVar *node)
+_outRangeVar(StringInfo str, const RangeVar *node)
{
WRITE_NODE_TYPE("RANGEVAR");
}
static void
-_outIntoClause(StringInfo str, IntoClause *node)
+_outIntoClause(StringInfo str, const IntoClause *node)
{
WRITE_NODE_TYPE("INTOCLAUSE");
}
static void
-_outVar(StringInfo str, Var *node)
+_outVar(StringInfo str, const Var *node)
{
WRITE_NODE_TYPE("VAR");
}
static void
-_outConst(StringInfo str, Const *node)
+_outConst(StringInfo str, const Const *node)
{
WRITE_NODE_TYPE("CONST");
}
static void
-_outParam(StringInfo str, Param *node)
+_outParam(StringInfo str, const Param *node)
{
WRITE_NODE_TYPE("PARAM");
}
static void
-_outAggref(StringInfo str, Aggref *node)
+_outAggref(StringInfo str, const Aggref *node)
{
WRITE_NODE_TYPE("AGGREF");
}
static void
-_outWindowFunc(StringInfo str, WindowFunc *node)
+_outWindowFunc(StringInfo str, const WindowFunc *node)
{
WRITE_NODE_TYPE("WINDOWFUNC");
}
static void
-_outArrayRef(StringInfo str, ArrayRef *node)
+_outArrayRef(StringInfo str, const ArrayRef *node)
{
WRITE_NODE_TYPE("ARRAYREF");
}
static void
-_outFuncExpr(StringInfo str, FuncExpr *node)
+_outFuncExpr(StringInfo str, const FuncExpr *node)
{
WRITE_NODE_TYPE("FUNCEXPR");
}
static void
-_outNamedArgExpr(StringInfo str, NamedArgExpr *node)
+_outNamedArgExpr(StringInfo str, const NamedArgExpr *node)
{
WRITE_NODE_TYPE("NAMEDARGEXPR");
}
static void
-_outOpExpr(StringInfo str, OpExpr *node)
+_outOpExpr(StringInfo str, const OpExpr *node)
{
WRITE_NODE_TYPE("OPEXPR");
}
static void
-_outDistinctExpr(StringInfo str, DistinctExpr *node)
+_outDistinctExpr(StringInfo str, const DistinctExpr *node)
{
WRITE_NODE_TYPE("DISTINCTEXPR");
}
static void
-_outNullIfExpr(StringInfo str, NullIfExpr *node)
+_outNullIfExpr(StringInfo str, const NullIfExpr *node)
{
WRITE_NODE_TYPE("NULLIFEXPR");
}
static void
-_outScalarArrayOpExpr(StringInfo str, ScalarArrayOpExpr *node)
+_outScalarArrayOpExpr(StringInfo str, const ScalarArrayOpExpr *node)
{
WRITE_NODE_TYPE("SCALARARRAYOPEXPR");
}
static void
-_outBoolExpr(StringInfo str, BoolExpr *node)
+_outBoolExpr(StringInfo str, const BoolExpr *node)
{
char *opstr = NULL;
}
static void
-_outSubLink(StringInfo str, SubLink *node)
+_outSubLink(StringInfo str, const SubLink *node)
{
WRITE_NODE_TYPE("SUBLINK");
}
static void
-_outSubPlan(StringInfo str, SubPlan *node)
+_outSubPlan(StringInfo str, const SubPlan *node)
{
WRITE_NODE_TYPE("SUBPLAN");
}
static void
-_outAlternativeSubPlan(StringInfo str, AlternativeSubPlan *node)
+_outAlternativeSubPlan(StringInfo str, const AlternativeSubPlan *node)
{
WRITE_NODE_TYPE("ALTERNATIVESUBPLAN");
}
static void
-_outFieldSelect(StringInfo str, FieldSelect *node)
+_outFieldSelect(StringInfo str, const FieldSelect *node)
{
WRITE_NODE_TYPE("FIELDSELECT");
}
static void
-_outFieldStore(StringInfo str, FieldStore *node)
+_outFieldStore(StringInfo str, const FieldStore *node)
{
WRITE_NODE_TYPE("FIELDSTORE");
}
static void
-_outRelabelType(StringInfo str, RelabelType *node)
+_outRelabelType(StringInfo str, const RelabelType *node)
{
WRITE_NODE_TYPE("RELABELTYPE");
}
static void
-_outCoerceViaIO(StringInfo str, CoerceViaIO *node)
+_outCoerceViaIO(StringInfo str, const CoerceViaIO *node)
{
WRITE_NODE_TYPE("COERCEVIAIO");
}
static void
-_outArrayCoerceExpr(StringInfo str, ArrayCoerceExpr *node)
+_outArrayCoerceExpr(StringInfo str, const ArrayCoerceExpr *node)
{
WRITE_NODE_TYPE("ARRAYCOERCEEXPR");
}
static void
-_outConvertRowtypeExpr(StringInfo str, ConvertRowtypeExpr *node)
+_outConvertRowtypeExpr(StringInfo str, const ConvertRowtypeExpr *node)
{
WRITE_NODE_TYPE("CONVERTROWTYPEEXPR");
}
static void
-_outCollateExpr(StringInfo str, CollateExpr *node)
+_outCollateExpr(StringInfo str, const CollateExpr *node)
{
WRITE_NODE_TYPE("COLLATE");
}
static void
-_outCaseExpr(StringInfo str, CaseExpr *node)
+_outCaseExpr(StringInfo str, const CaseExpr *node)
{
WRITE_NODE_TYPE("CASE");
}
static void
-_outCaseWhen(StringInfo str, CaseWhen *node)
+_outCaseWhen(StringInfo str, const CaseWhen *node)
{
WRITE_NODE_TYPE("WHEN");
}
static void
-_outCaseTestExpr(StringInfo str, CaseTestExpr *node)
+_outCaseTestExpr(StringInfo str, const CaseTestExpr *node)
{
WRITE_NODE_TYPE("CASETESTEXPR");
}
static void
-_outArrayExpr(StringInfo str, ArrayExpr *node)
+_outArrayExpr(StringInfo str, const ArrayExpr *node)
{
WRITE_NODE_TYPE("ARRAY");
}
static void
-_outRowExpr(StringInfo str, RowExpr *node)
+_outRowExpr(StringInfo str, const RowExpr *node)
{
WRITE_NODE_TYPE("ROW");
}
static void
-_outRowCompareExpr(StringInfo str, RowCompareExpr *node)
+_outRowCompareExpr(StringInfo str, const RowCompareExpr *node)
{
WRITE_NODE_TYPE("ROWCOMPARE");
}
static void
-_outCoalesceExpr(StringInfo str, CoalesceExpr *node)
+_outCoalesceExpr(StringInfo str, const CoalesceExpr *node)
{
WRITE_NODE_TYPE("COALESCE");
}
static void
-_outMinMaxExpr(StringInfo str, MinMaxExpr *node)
+_outMinMaxExpr(StringInfo str, const MinMaxExpr *node)
{
WRITE_NODE_TYPE("MINMAX");
}
static void
-_outXmlExpr(StringInfo str, XmlExpr *node)
+_outXmlExpr(StringInfo str, const XmlExpr *node)
{
WRITE_NODE_TYPE("XMLEXPR");
}
static void
-_outNullTest(StringInfo str, NullTest *node)
+_outNullTest(StringInfo str, const NullTest *node)
{
WRITE_NODE_TYPE("NULLTEST");
}
static void
-_outBooleanTest(StringInfo str, BooleanTest *node)
+_outBooleanTest(StringInfo str, const BooleanTest *node)
{
WRITE_NODE_TYPE("BOOLEANTEST");
}
static void
-_outCoerceToDomain(StringInfo str, CoerceToDomain *node)
+_outCoerceToDomain(StringInfo str, const CoerceToDomain *node)
{
WRITE_NODE_TYPE("COERCETODOMAIN");
}
static void
-_outCoerceToDomainValue(StringInfo str, CoerceToDomainValue *node)
+_outCoerceToDomainValue(StringInfo str, const CoerceToDomainValue *node)
{
WRITE_NODE_TYPE("COERCETODOMAINVALUE");
}
static void
-_outSetToDefault(StringInfo str, SetToDefault *node)
+_outSetToDefault(StringInfo str, const SetToDefault *node)
{
WRITE_NODE_TYPE("SETTODEFAULT");
}
static void
-_outCurrentOfExpr(StringInfo str, CurrentOfExpr *node)
+_outCurrentOfExpr(StringInfo str, const CurrentOfExpr *node)
{
WRITE_NODE_TYPE("CURRENTOFEXPR");
}
static void
-_outTargetEntry(StringInfo str, TargetEntry *node)
+_outTargetEntry(StringInfo str, const TargetEntry *node)
{
WRITE_NODE_TYPE("TARGETENTRY");
}
static void
-_outRangeTblRef(StringInfo str, RangeTblRef *node)
+_outRangeTblRef(StringInfo str, const RangeTblRef *node)
{
WRITE_NODE_TYPE("RANGETBLREF");
}
static void
-_outJoinExpr(StringInfo str, JoinExpr *node)
+_outJoinExpr(StringInfo str, const JoinExpr *node)
{
WRITE_NODE_TYPE("JOINEXPR");
}
static void
-_outFromExpr(StringInfo str, FromExpr *node)
+_outFromExpr(StringInfo str, const FromExpr *node)
{
WRITE_NODE_TYPE("FROMEXPR");
* We can print the parent's relids for identification purposes, though.
*/
static void
-_outPathInfo(StringInfo str, Path *node)
+_outPathInfo(StringInfo str, const Path *node)
{
WRITE_ENUM_FIELD(pathtype, NodeTag);
appendStringInfo(str, " :parent_relids ");
* print the basic stuff of all nodes that inherit from JoinPath
*/
static void
-_outJoinPathInfo(StringInfo str, JoinPath *node)
+_outJoinPathInfo(StringInfo str, const JoinPath *node)
{
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
WRITE_ENUM_FIELD(jointype, JoinType);
WRITE_NODE_FIELD(outerjoinpath);
}
static void
-_outPath(StringInfo str, Path *node)
+_outPath(StringInfo str, const Path *node)
{
WRITE_NODE_TYPE("PATH");
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
}
static void
-_outIndexPath(StringInfo str, IndexPath *node)
+_outIndexPath(StringInfo str, const IndexPath *node)
{
WRITE_NODE_TYPE("INDEXPATH");
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
WRITE_NODE_FIELD(indexinfo);
WRITE_NODE_FIELD(indexclauses);
}
static void
-_outBitmapHeapPath(StringInfo str, BitmapHeapPath *node)
+_outBitmapHeapPath(StringInfo str, const BitmapHeapPath *node)
{
WRITE_NODE_TYPE("BITMAPHEAPPATH");
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
WRITE_NODE_FIELD(bitmapqual);
WRITE_BOOL_FIELD(isjoininner);
}
static void
-_outBitmapAndPath(StringInfo str, BitmapAndPath *node)
+_outBitmapAndPath(StringInfo str, const BitmapAndPath *node)
{
WRITE_NODE_TYPE("BITMAPANDPATH");
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
WRITE_NODE_FIELD(bitmapquals);
WRITE_FLOAT_FIELD(bitmapselectivity, "%.4f");
}
static void
-_outBitmapOrPath(StringInfo str, BitmapOrPath *node)
+_outBitmapOrPath(StringInfo str, const BitmapOrPath *node)
{
WRITE_NODE_TYPE("BITMAPORPATH");
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
WRITE_NODE_FIELD(bitmapquals);
WRITE_FLOAT_FIELD(bitmapselectivity, "%.4f");
}
static void
-_outTidPath(StringInfo str, TidPath *node)
+_outTidPath(StringInfo str, const TidPath *node)
{
WRITE_NODE_TYPE("TIDPATH");
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
WRITE_NODE_FIELD(tidquals);
}
static void
-_outForeignPath(StringInfo str, ForeignPath *node)
+_outForeignPath(StringInfo str, const ForeignPath *node)
{
WRITE_NODE_TYPE("FOREIGNPATH");
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
WRITE_NODE_FIELD(fdwplan);
}
static void
-_outAppendPath(StringInfo str, AppendPath *node)
+_outAppendPath(StringInfo str, const AppendPath *node)
{
WRITE_NODE_TYPE("APPENDPATH");
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
WRITE_NODE_FIELD(subpaths);
}
static void
-_outMergeAppendPath(StringInfo str, MergeAppendPath *node)
+_outMergeAppendPath(StringInfo str, const MergeAppendPath *node)
{
WRITE_NODE_TYPE("MERGEAPPENDPATH");
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
WRITE_NODE_FIELD(subpaths);
WRITE_FLOAT_FIELD(limit_tuples, "%.0f");
}
static void
-_outResultPath(StringInfo str, ResultPath *node)
+_outResultPath(StringInfo str, const ResultPath *node)
{
WRITE_NODE_TYPE("RESULTPATH");
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
WRITE_NODE_FIELD(quals);
}
static void
-_outMaterialPath(StringInfo str, MaterialPath *node)
+_outMaterialPath(StringInfo str, const MaterialPath *node)
{
WRITE_NODE_TYPE("MATERIALPATH");
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
WRITE_NODE_FIELD(subpath);
}
static void
-_outUniquePath(StringInfo str, UniquePath *node)
+_outUniquePath(StringInfo str, const UniquePath *node)
{
WRITE_NODE_TYPE("UNIQUEPATH");
- _outPathInfo(str, (Path *) node);
+ _outPathInfo(str, (const Path *) node);
WRITE_NODE_FIELD(subpath);
WRITE_ENUM_FIELD(umethod, UniquePathMethod);
}
static void
-_outNestPath(StringInfo str, NestPath *node)
+_outNestPath(StringInfo str, const NestPath *node)
{
WRITE_NODE_TYPE("NESTPATH");
- _outJoinPathInfo(str, (JoinPath *) node);
+ _outJoinPathInfo(str, (const JoinPath *) node);
}
static void
-_outMergePath(StringInfo str, MergePath *node)
+_outMergePath(StringInfo str, const MergePath *node)
{
WRITE_NODE_TYPE("MERGEPATH");
- _outJoinPathInfo(str, (JoinPath *) node);
+ _outJoinPathInfo(str, (const JoinPath *) node);
WRITE_NODE_FIELD(path_mergeclauses);
WRITE_NODE_FIELD(outersortkeys);
}
static void
-_outHashPath(StringInfo str, HashPath *node)
+_outHashPath(StringInfo str, const HashPath *node)
{
WRITE_NODE_TYPE("HASHPATH");
- _outJoinPathInfo(str, (JoinPath *) node);
+ _outJoinPathInfo(str, (const JoinPath *) node);
WRITE_NODE_FIELD(path_hashclauses);
WRITE_INT_FIELD(num_batches);
}
static void
-_outPlannerGlobal(StringInfo str, PlannerGlobal *node)
+_outPlannerGlobal(StringInfo str, const PlannerGlobal *node)
{
WRITE_NODE_TYPE("PLANNERGLOBAL");
}
static void
-_outPlannerInfo(StringInfo str, PlannerInfo *node)
+_outPlannerInfo(StringInfo str, const PlannerInfo *node)
{
WRITE_NODE_TYPE("PLANNERINFO");
}
static void
-_outRelOptInfo(StringInfo str, RelOptInfo *node)
+_outRelOptInfo(StringInfo str, const RelOptInfo *node)
{
WRITE_NODE_TYPE("RELOPTINFO");
}
static void
-_outIndexOptInfo(StringInfo str, IndexOptInfo *node)
+_outIndexOptInfo(StringInfo str, const IndexOptInfo *node)
{
WRITE_NODE_TYPE("INDEXOPTINFO");
}
static void
-_outEquivalenceClass(StringInfo str, EquivalenceClass *node)
+_outEquivalenceClass(StringInfo str, const EquivalenceClass *node)
{
/*
* To simplify reading, we just chase up to the topmost merged EC and
}
static void
-_outEquivalenceMember(StringInfo str, EquivalenceMember *node)
+_outEquivalenceMember(StringInfo str, const EquivalenceMember *node)
{
WRITE_NODE_TYPE("EQUIVALENCEMEMBER");
}
static void
-_outPathKey(StringInfo str, PathKey *node)
+_outPathKey(StringInfo str, const PathKey *node)
{
WRITE_NODE_TYPE("PATHKEY");
}
static void
-_outRestrictInfo(StringInfo str, RestrictInfo *node)
+_outRestrictInfo(StringInfo str, const RestrictInfo *node)
{
WRITE_NODE_TYPE("RESTRICTINFO");
}
static void
-_outInnerIndexscanInfo(StringInfo str, InnerIndexscanInfo *node)
+_outInnerIndexscanInfo(StringInfo str, const InnerIndexscanInfo *node)
{
WRITE_NODE_TYPE("INNERINDEXSCANINFO");
WRITE_BITMAPSET_FIELD(other_relids);
}
static void
-_outPlaceHolderVar(StringInfo str, PlaceHolderVar *node)
+_outPlaceHolderVar(StringInfo str, const PlaceHolderVar *node)
{
WRITE_NODE_TYPE("PLACEHOLDERVAR");
}
static void
-_outSpecialJoinInfo(StringInfo str, SpecialJoinInfo *node)
+_outSpecialJoinInfo(StringInfo str, const SpecialJoinInfo *node)
{
WRITE_NODE_TYPE("SPECIALJOININFO");
}
static void
-_outAppendRelInfo(StringInfo str, AppendRelInfo *node)
+_outAppendRelInfo(StringInfo str, const AppendRelInfo *node)
{
WRITE_NODE_TYPE("APPENDRELINFO");
}
static void
-_outPlaceHolderInfo(StringInfo str, PlaceHolderInfo *node)
+_outPlaceHolderInfo(StringInfo str, const PlaceHolderInfo *node)
{
WRITE_NODE_TYPE("PLACEHOLDERINFO");
}
static void
-_outMinMaxAggInfo(StringInfo str, MinMaxAggInfo *node)
+_outMinMaxAggInfo(StringInfo str, const MinMaxAggInfo *node)
{
WRITE_NODE_TYPE("MINMAXAGGINFO");
}
static void
-_outPlannerParamItem(StringInfo str, PlannerParamItem *node)
+_outPlannerParamItem(StringInfo str, const PlannerParamItem *node)
{
WRITE_NODE_TYPE("PLANNERPARAMITEM");
*****************************************************************************/
static void
-_outCreateStmt(StringInfo str, CreateStmt *node)
+_outCreateStmt(StringInfo str, const CreateStmt *node)
{
WRITE_NODE_TYPE("CREATESTMT");
}
static void
-_outCreateForeignTableStmt(StringInfo str, CreateForeignTableStmt *node)
+_outCreateForeignTableStmt(StringInfo str, const CreateForeignTableStmt *node)
{
WRITE_NODE_TYPE("CREATEFOREIGNTABLESTMT");
- _outCreateStmt(str, (CreateStmt *) &node->base);
+ _outCreateStmt(str, (const CreateStmt *) &node->base);
WRITE_STRING_FIELD(servername);
WRITE_NODE_FIELD(options);
}
static void
-_outIndexStmt(StringInfo str, IndexStmt *node)
+_outIndexStmt(StringInfo str, const IndexStmt *node)
{
WRITE_NODE_TYPE("INDEXSTMT");
}
static void
-_outNotifyStmt(StringInfo str, NotifyStmt *node)
+_outNotifyStmt(StringInfo str, const NotifyStmt *node)
{
WRITE_NODE_TYPE("NOTIFY");
}
static void
-_outDeclareCursorStmt(StringInfo str, DeclareCursorStmt *node)
+_outDeclareCursorStmt(StringInfo str, const DeclareCursorStmt *node)
{
WRITE_NODE_TYPE("DECLARECURSOR");
}
static void
-_outSelectStmt(StringInfo str, SelectStmt *node)
+_outSelectStmt(StringInfo str, const SelectStmt *node)
{
WRITE_NODE_TYPE("SELECT");
}
static void
-_outFuncCall(StringInfo str, FuncCall *node)
+_outFuncCall(StringInfo str, const FuncCall *node)
{
WRITE_NODE_TYPE("FUNCCALL");
}
static void
-_outDefElem(StringInfo str, DefElem *node)
+_outDefElem(StringInfo str, const DefElem *node)
{
WRITE_NODE_TYPE("DEFELEM");
}
static void
-_outInhRelation(StringInfo str, InhRelation *node)
+_outInhRelation(StringInfo str, const InhRelation *node)
{
WRITE_NODE_TYPE("INHRELATION");
}
static void
-_outLockingClause(StringInfo str, LockingClause *node)
+_outLockingClause(StringInfo str, const LockingClause *node)
{
WRITE_NODE_TYPE("LOCKINGCLAUSE");
}
static void
-_outXmlSerialize(StringInfo str, XmlSerialize *node)
+_outXmlSerialize(StringInfo str, const XmlSerialize *node)
{
WRITE_NODE_TYPE("XMLSERIALIZE");
}
static void
-_outColumnDef(StringInfo str, ColumnDef *node)
+_outColumnDef(StringInfo str, const ColumnDef *node)
{
WRITE_NODE_TYPE("COLUMNDEF");
}
static void
-_outTypeName(StringInfo str, TypeName *node)
+_outTypeName(StringInfo str, const TypeName *node)
{
WRITE_NODE_TYPE("TYPENAME");
}
static void
-_outTypeCast(StringInfo str, TypeCast *node)
+_outTypeCast(StringInfo str, const TypeCast *node)
{
WRITE_NODE_TYPE("TYPECAST");
}
static void
-_outCollateClause(StringInfo str, CollateClause *node)
+_outCollateClause(StringInfo str, const CollateClause *node)
{
WRITE_NODE_TYPE("COLLATECLAUSE");
}
static void
-_outIndexElem(StringInfo str, IndexElem *node)
+_outIndexElem(StringInfo str, const IndexElem *node)
{
WRITE_NODE_TYPE("INDEXELEM");
}
static void
-_outQuery(StringInfo str, Query *node)
+_outQuery(StringInfo str, const Query *node)
{
WRITE_NODE_TYPE("QUERY");
}
static void
-_outSortGroupClause(StringInfo str, SortGroupClause *node)
+_outSortGroupClause(StringInfo str, const SortGroupClause *node)
{
WRITE_NODE_TYPE("SORTGROUPCLAUSE");
}
static void
-_outWindowClause(StringInfo str, WindowClause *node)
+_outWindowClause(StringInfo str, const WindowClause *node)
{
WRITE_NODE_TYPE("WINDOWCLAUSE");
}
static void
-_outRowMarkClause(StringInfo str, RowMarkClause *node)
+_outRowMarkClause(StringInfo str, const RowMarkClause *node)
{
WRITE_NODE_TYPE("ROWMARKCLAUSE");
}
static void
-_outWithClause(StringInfo str, WithClause *node)
+_outWithClause(StringInfo str, const WithClause *node)
{
WRITE_NODE_TYPE("WITHCLAUSE");
}
static void
-_outCommonTableExpr(StringInfo str, CommonTableExpr *node)
+_outCommonTableExpr(StringInfo str, const CommonTableExpr *node)
{
WRITE_NODE_TYPE("COMMONTABLEEXPR");
}
static void
-_outSetOperationStmt(StringInfo str, SetOperationStmt *node)
+_outSetOperationStmt(StringInfo str, const SetOperationStmt *node)
{
WRITE_NODE_TYPE("SETOPERATIONSTMT");
}
static void
-_outRangeTblEntry(StringInfo str, RangeTblEntry *node)
+_outRangeTblEntry(StringInfo str, const RangeTblEntry *node)
{
WRITE_NODE_TYPE("RTE");
}
static void
-_outAExpr(StringInfo str, A_Expr *node)
+_outAExpr(StringInfo str, const A_Expr *node)
{
WRITE_NODE_TYPE("AEXPR");
}
static void
-_outValue(StringInfo str, Value *value)
+_outValue(StringInfo str, const Value *value)
{
switch (value->type)
{
}
static void
-_outColumnRef(StringInfo str, ColumnRef *node)
+_outColumnRef(StringInfo str, const ColumnRef *node)
{
WRITE_NODE_TYPE("COLUMNREF");
}
static void
-_outParamRef(StringInfo str, ParamRef *node)
+_outParamRef(StringInfo str, const ParamRef *node)
{
WRITE_NODE_TYPE("PARAMREF");
}
static void
-_outAConst(StringInfo str, A_Const *node)
+_outAConst(StringInfo str, const A_Const *node)
{
WRITE_NODE_TYPE("A_CONST");
}
static void
-_outA_Star(StringInfo str, A_Star *node)
+_outA_Star(StringInfo str, const A_Star *node)
{
WRITE_NODE_TYPE("A_STAR");
}
static void
-_outA_Indices(StringInfo str, A_Indices *node)
+_outA_Indices(StringInfo str, const A_Indices *node)
{
WRITE_NODE_TYPE("A_INDICES");
}
static void
-_outA_Indirection(StringInfo str, A_Indirection *node)
+_outA_Indirection(StringInfo str, const A_Indirection *node)
{
WRITE_NODE_TYPE("A_INDIRECTION");
}
static void
-_outA_ArrayExpr(StringInfo str, A_ArrayExpr *node)
+_outA_ArrayExpr(StringInfo str, const A_ArrayExpr *node)
{
WRITE_NODE_TYPE("A_ARRAYEXPR");
}
static void
-_outResTarget(StringInfo str, ResTarget *node)
+_outResTarget(StringInfo str, const ResTarget *node)
{
WRITE_NODE_TYPE("RESTARGET");
}
static void
-_outSortBy(StringInfo str, SortBy *node)
+_outSortBy(StringInfo str, const SortBy *node)
{
WRITE_NODE_TYPE("SORTBY");
}
static void
-_outWindowDef(StringInfo str, WindowDef *node)
+_outWindowDef(StringInfo str, const WindowDef *node)
{
WRITE_NODE_TYPE("WINDOWDEF");
}
static void
-_outRangeSubselect(StringInfo str, RangeSubselect *node)
+_outRangeSubselect(StringInfo str, const RangeSubselect *node)
{
WRITE_NODE_TYPE("RANGESUBSELECT");
}
static void
-_outRangeFunction(StringInfo str, RangeFunction *node)
+_outRangeFunction(StringInfo str, const RangeFunction *node)
{
WRITE_NODE_TYPE("RANGEFUNCTION");
}
static void
-_outConstraint(StringInfo str, Constraint *node)
+_outConstraint(StringInfo str, const Constraint *node)
{
WRITE_NODE_TYPE("CONSTRAINT");
* converts a Node into ascii string and append it to 'str'
*/
static void
-_outNode(StringInfo str, void *obj)
+_outNode(StringInfo str, const void *obj)
{
if (obj == NULL)
appendStringInfo(str, "<>");
* returns the ascii representation of the Node as a palloc'd string
*/
char *
-nodeToString(void *obj)
+nodeToString(const void *obj)
{
StringInfoData str;
* print contents of Node to stdout
*/
void
-print(void *obj)
+print(const void *obj)
{
char *s;
char *f;
* pretty-print contents of Node to stdout
*/
void
-pprint(void *obj)
+pprint(const void *obj)
{
char *s;
char *f;
* send pretty-printed contents of Node to postmaster log
*/
void
-elog_node_display(int lev, const char *title, void *obj, bool pretty)
+elog_node_display(int lev, const char *title, const void *obj, bool pretty)
{
char *s;
char *f;
* print contents of range table
*/
void
-print_rt(List *rtable)
+print_rt(const List *rtable)
{
- ListCell *l;
+ const ListCell *l;
int i = 1;
printf("resno\trefname \trelid\tinFromCl\n");
* print an expression
*/
void
-print_expr(Node *expr, List *rtable)
+print_expr(const Node *expr, const List *rtable)
{
if (expr == NULL)
{
if (IsA(expr, Var))
{
- Var *var = (Var *) expr;
+ const Var *var = (const Var *) expr;
char *relname,
*attname;
}
else if (IsA(expr, Const))
{
- Const *c = (Const *) expr;
+ const Const *c = (const Const *) expr;
Oid typoutput;
bool typIsVarlena;
char *outputstr;
}
else if (IsA(expr, OpExpr))
{
- OpExpr *e = (OpExpr *) expr;
+ const OpExpr *e = (const OpExpr *) expr;
char *opname;
opname = get_opname(e->opno);
if (list_length(e->args) > 1)
{
- print_expr(get_leftop((Expr *) e), rtable);
+ print_expr(get_leftop((const Expr *) e), rtable);
printf(" %s ", ((opname != NULL) ? opname : "(invalid operator)"));
- print_expr(get_rightop((Expr *) e), rtable);
+ print_expr(get_rightop((const Expr *) e), rtable);
}
else
{
/* we print prefix and postfix ops the same... */
printf("%s ", ((opname != NULL) ? opname : "(invalid operator)"));
- print_expr(get_leftop((Expr *) e), rtable);
+ print_expr(get_leftop((const Expr *) e), rtable);
}
}
else if (IsA(expr, FuncExpr))
{
- FuncExpr *e = (FuncExpr *) expr;
+ const FuncExpr *e = (const FuncExpr *) expr;
char *funcname;
ListCell *l;
* pathkeys list of PathKeys
*/
void
-print_pathkeys(List *pathkeys, List *rtable)
+print_pathkeys(const List *pathkeys, const List *rtable)
{
- ListCell *i;
+ const ListCell *i;
printf("(");
foreach(i, pathkeys)
* print targetlist in a more legible way.
*/
void
-print_tl(List *tlist, List *rtable)
+print_tl(const List *tlist, const List *rtable)
{
- ListCell *tl;
+ const ListCell *tl;
printf("(\n");
foreach(tl, tlist)
* or (op expr)
*/
Node *
-get_leftop(Expr *clause)
+get_leftop(const Expr *clause)
{
- OpExpr *expr = (OpExpr *) clause;
+ const OpExpr *expr = (const OpExpr *) clause;
if (expr->args != NIL)
return linitial(expr->args);
* NB: result will be NULL if applied to a unary op clause.
*/
Node *
-get_rightop(Expr *clause)
+get_rightop(const Expr *clause)
{
- OpExpr *expr = (OpExpr *) clause;
+ const OpExpr *expr = (const OpExpr *) clause;
if (list_length(expr->args) >= 2)
return lsecond(expr->args);
#define QTW_DONT_COPY_QUERY 0x20 /* do not copy top Query */
-extern Oid exprType(Node *expr);
-extern int32 exprTypmod(Node *expr);
-extern bool exprIsLengthCoercion(Node *expr, int32 *coercedTypmod);
+extern Oid exprType(const Node *expr);
+extern int32 exprTypmod(const Node *expr);
+extern bool exprIsLengthCoercion(const Node *expr, int32 *coercedTypmod);
extern bool expression_returns_set(Node *clause);
-extern Oid exprCollation(Node *expr);
-extern Oid exprInputCollation(Node *expr);
+extern Oid exprCollation(const Node *expr);
+extern Oid exprInputCollation(const Node *expr);
extern void exprSetCollation(Node *expr, Oid collation);
extern void exprSetInputCollation(Node *expr, Oid inputcollation);
-extern int exprLocation(Node *expr);
+extern int exprLocation(const Node *expr);
extern bool expression_tree_walker(Node *node, bool (*walker) (),
void *context);
NodeTag type;
} Node;
-#define nodeTag(nodeptr) (((Node*)(nodeptr))->type)
+#define nodeTag(nodeptr) (((const Node*)(nodeptr))->type)
/*
* newNode -
/*
* nodes/{outfuncs.c,print.c}
*/
-extern char *nodeToString(void *obj);
+extern char *nodeToString(const void *obj);
/*
* nodes/{readfuncs.c,read.c}
/*
* nodes/copyfuncs.c
*/
-extern void *copyObject(void *obj);
+extern void *copyObject(const void *obj);
/*
* nodes/equalfuncs.c
*/
-extern bool equal(void *a, void *b);
+extern bool equal(const void *a, const void *b);
/*
#ifdef USE_INLINE
static inline ListCell *
-list_head(List *l)
+list_head(const List *l)
{
return l ? l->head : NULL;
}
}
static inline int
-list_length(List *l)
+list_length(const List *l)
{
return l ? l->length : 0;
}
#else
-extern ListCell *list_head(List *l);
+extern ListCell *list_head(const List *l);
extern ListCell *list_tail(List *l);
-extern int list_length(List *l);
+extern int list_length(const List *l);
#endif /* USE_INLINE */
/*
extern List *list_concat(List *list1, List *list2);
extern List *list_truncate(List *list, int new_size);
-extern void *list_nth(List *list, int n);
-extern int list_nth_int(List *list, int n);
-extern Oid list_nth_oid(List *list, int n);
+extern void *list_nth(const List *list, int n);
+extern int list_nth_int(const List *list, int n);
+extern Oid list_nth_oid(const List *list, int n);
-extern bool list_member(List *list, void *datum);
-extern bool list_member_ptr(List *list, void *datum);
-extern bool list_member_int(List *list, int datum);
-extern bool list_member_oid(List *list, Oid datum);
+extern bool list_member(const List *list, const void *datum);
+extern bool list_member_ptr(const List *list, const void *datum);
+extern bool list_member_int(const List *list, int datum);
+extern bool list_member_oid(const List *list, Oid datum);
extern List *list_delete(List *list, void *datum);
extern List *list_delete_ptr(List *list, void *datum);
extern List *list_delete_first(List *list);
extern List *list_delete_cell(List *list, ListCell *cell, ListCell *prev);
-extern List *list_union(List *list1, List *list2);
-extern List *list_union_ptr(List *list1, List *list2);
-extern List *list_union_int(List *list1, List *list2);
-extern List *list_union_oid(List *list1, List *list2);
+extern List *list_union(const List *list1, const List *list2);
+extern List *list_union_ptr(const List *list1, const List *list2);
+extern List *list_union_int(const List *list1, const List *list2);
+extern List *list_union_oid(const List *list1, const List *list2);
-extern List *list_intersection(List *list1, List *list2);
+extern List *list_intersection(const List *list1, const List *list2);
/* currently, there's no need for list_intersection_int etc */
-extern List *list_difference(List *list1, List *list2);
-extern List *list_difference_ptr(List *list1, List *list2);
-extern List *list_difference_int(List *list1, List *list2);
-extern List *list_difference_oid(List *list1, List *list2);
+extern List *list_difference(const List *list1, const List *list2);
+extern List *list_difference_ptr(const List *list1, const List *list2);
+extern List *list_difference_int(const List *list1, const List *list2);
+extern List *list_difference_oid(const List *list1, const List *list2);
extern List *list_append_unique(List *list, void *datum);
extern List *list_append_unique_ptr(List *list, void *datum);
extern void list_free(List *list);
extern void list_free_deep(List *list);
-extern List *list_copy(List *list);
-extern List *list_copy_tail(List *list, int nskip);
+extern List *list_copy(const List *list);
+extern List *list_copy_tail(const List *list, int nskip);
/*
* To ease migration to the new list API, a set of compatibility
#define nodeDisplay(x) pprint(x)
-extern void print(void *obj);
-extern void pprint(void *obj);
+extern void print(const void *obj);
+extern void pprint(const void *obj);
extern void elog_node_display(int lev, const char *title,
- void *obj, bool pretty);
+ const void *obj, bool pretty);
extern char *format_node_dump(const char *dump);
extern char *pretty_format_node_dump(const char *dump);
-extern void print_rt(List *rtable);
-extern void print_expr(Node *expr, List *rtable);
-extern void print_pathkeys(List *pathkeys, List *rtable);
-extern void print_tl(List *tlist, List *rtable);
+extern void print_rt(const List *rtable);
+extern void print_expr(const Node *expr, const List *rtable);
+extern void print_pathkeys(const List *pathkeys, const List *rtable);
+extern void print_tl(const List *tlist, const List *rtable);
extern void print_slot(TupleTableSlot *slot);
#endif /* PRINT_H */
extern Expr *make_opclause(Oid opno, Oid opresulttype, bool opretset,
Expr *leftop, Expr *rightop,
Oid opcollid, Oid inputcollid);
-extern Node *get_leftop(Expr *clause);
-extern Node *get_rightop(Expr *clause);
+extern Node *get_leftop(const Expr *clause);
+extern Node *get_rightop(const Expr *clause);
extern bool not_clause(Node *clause);
extern Expr *make_notclause(Expr *notclause);