Files
openGauss-server/src/include/executor/node/nodeCtescan.h
dengxuyue c7b25efcff New features (and bug fixes)
1. alter large sequence
    2. subpartition
    2.1 split subpartition
    2.2 truncate subpartition
    3. 支持load
    4. 支持start-with/connect-by
    5. ...
2021-12-29 21:33:28 +08:00

59 lines
2.3 KiB
C

/* -------------------------------------------------------------------------
*
* nodeCtescan.h
*
*
*
* Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 2021, openGauss Contributors
*
* src/include/executor/nodeCtescan.h
*
* -------------------------------------------------------------------------
*/
#ifndef NODECTESCAN_H
#define NODECTESCAN_H
#include "nodes/execnodes.h"
extern CteScanState* ExecInitCteScan(CteScan* node, EState* estate, int eflags);
extern TupleTableSlot* ExecCteScan(CteScanState* node);
extern void ExecEndCteScan(CteScanState* node);
extern void ExecReScanCteScan(CteScanState* node);
/*
* stuffs for START WITH ... CONNECT BY support
*/
#define SYS_CONNECT_BY_PATH_FUNCOID 9350
#define CONNECT_BY_ROOT_FUNCOID 9351
#define IsHierarchicalQueryFuncOid(funcOid) \
((funcOid == SYS_CONNECT_BY_PATH_FUNCOID || funcOid == CONNECT_BY_ROOT_FUNCOID))
typedef struct StartWithFuncEvalState
{
ExprContext *sw_econtext;
ExprState *sw_exprstate;
} StartWithFuncEvalState;
extern StartWithOpState* ExecInitStartWithOp(StartWithOp* node, EState* estate, int eflags);
extern TupleTableSlot* ExecStartWithOp(StartWithOpState *node);
extern void ExecEndStartWithOp(StartWithOpState *node);
extern void ExecReScanStartWithOp(StartWithOpState *node);
extern TupleTableSlot *ConvertRuScanOutputSlot(RecursiveUnionState *rustate,
TupleTableSlot *scanSlot,
bool inrecursing);
extern TupleTableSlot *ConvertStartWithOpOutputSlot(StartWithOpState *node,
TupleTableSlot *srcSlot,
TupleTableSlot *dstSlot);
extern TupleTableSlot *ConvertRuScanOutputSlot(RecursiveUnionState *rustate,
TupleTableSlot *scanSlot,
bool inrecursing);
extern bool CheckCycleExeception(StartWithOpState *node, TupleTableSlot *slot);
extern int SibglingsKeyCmp(Datum x, Datum y, SortSupport ssup);
extern int SibglingsKeyCmpFast(Datum x, Datum y, SortSupport ssup);
#endif /* NODECTESCAN_H */