sync all inner code

This commit is contained in:
yanghao
2023-03-07 20:32:34 +08:00
parent 93cf8543c1
commit 60c0c33328
127 changed files with 1220 additions and 556 deletions

View File

@ -581,7 +581,8 @@ static inline void tableam_tslot_formbatch(TupleTableSlot* slot, VectorBatch* ba
slot->tts_tam_ops->tslot_formbatch(slot, batch, cur_rows, natts);
}
static inline Datum tableam_tslot_getattr(TupleTableSlot *slot, int attnum, bool *isnull, bool need_transform_anyarray = false)
static inline Datum tableam_tslot_getattr(TupleTableSlot *slot, int attnum, bool *isnull,
bool need_transform_anyarray = false)
{
return slot->tts_tam_ops->tslot_getattr(slot, attnum, isnull, need_transform_anyarray);
}
@ -635,7 +636,8 @@ static inline void tableam_tops_deform_tuple(Tuple tuple, TupleDesc tuple_desc,
return tuple_desc->td_tam_ops->tops_deform_tuple(tuple, tuple_desc, values, isnull);
}
static inline void tableam_tops_deform_tuple2(Tuple tuple, TupleDesc tuple_desc, Datum *values, bool *isnull, Buffer buffer)
static inline void tableam_tops_deform_tuple2(Tuple tuple, TupleDesc tuple_desc, Datum *values, bool *isnull,
Buffer buffer)
{
AssertValidTuple(tuple);
Assert(g_tableam_routines[GetTabelAmIndexTuple(tuple)] == tuple_desc->td_tam_ops);
@ -695,7 +697,6 @@ static inline Tuple tableam_tops_opfusion_modify_tuple(Tuple tuple, TupleDesc tu
static inline Datum tableam_tops_tuple_getattr(Tuple tuple, int att_num, TupleDesc tuple_desc, bool *is_null)
{
AssertValidTuple(tuple);
//FIXME: Assert(g_tableam_routines[GetTabelAmIndexTuple(tuple)] == tuple_desc->td_tam_ops);
return GetTableAmRoutine((TableAmType)(GetTabelAmIndexTuple(tuple)))->tops_tuple_getattr(tuple, att_num,
tuple_desc, is_null);
}
@ -714,7 +715,8 @@ static inline bool tableam_tops_tuple_attisnull(Tuple tuple, int attnum, TupleDe
* We allow a NULL tupledesc for relations not expected to have missing
* values, such as catalog relations and indexes.
*/
return GetTableAmRoutine((TableAmType)(GetTabelAmIndexTuple(tuple)))->tops_tuple_attisnull(tuple, attnum, tuple_desc);
return GetTableAmRoutine((TableAmType)(GetTabelAmIndexTuple(tuple)))
->tops_tuple_attisnull(tuple, attnum, tuple_desc);
}
static inline Tuple tableam_tops_copy_tuple(Tuple tuple)
@ -931,10 +933,11 @@ static inline TableScanDesc tableam_scan_begin_bm(Relation relation, Snapshot sn
}
static inline TableScanDesc tableam_scan_begin_sampling(Relation relation, Snapshot snapshot, int nkeys, ScanKey key,
bool allow_strat, bool allow_sync, RangeScanInRedis rangeScanInRedis = { false, 0, 0 } )
bool allow_strat, bool allow_sync,
RangeScanInRedis rangeScanInRedis = {false, 0, 0})
{
return relation->rd_tam_ops->scan_begin_sampling(relation, snapshot, nkeys, key, allow_strat,
allow_sync, rangeScanInRedis);
return relation->rd_tam_ops->scan_begin_sampling(relation, snapshot, nkeys, key, allow_strat, allow_sync,
rangeScanInRedis);
}
static inline TableScanDesc tableam_scan_begin_parallel(Relation relation, ParallelHeapScanDesc parallel_scan)
@ -942,7 +945,8 @@ static inline TableScanDesc tableam_scan_begin_parallel(Relation relation, Paral
return relation->rd_tam_ops->scan_begin_parallel(relation, parallel_scan);
}
static inline Tuple tableam_scan_getnexttuple(TableScanDesc sscan, ScanDirection direction, bool* has_cur_xact_write = NULL)
static inline Tuple tableam_scan_getnexttuple(TableScanDesc sscan, ScanDirection direction,
bool *has_cur_xact_write = NULL)
{
return sscan->rs_rd->rd_tam_ops->scan_getnexttuple(sscan, direction, has_cur_xact_write);
}
@ -957,10 +961,10 @@ static inline void tableam_scan_getpage(TableScanDesc sscan, BlockNumber page)
return sscan->rs_rd->rd_tam_ops->scan_getpage(sscan, page);
}
static inline Tuple tableam_scan_gettuple_for_verify(TableScanDesc sscan, ScanDirection direction, bool isValidRelationPage)
static inline Tuple tableam_scan_gettuple_for_verify(TableScanDesc sscan, ScanDirection direction,
bool isValidRelationPage)
{
return sscan->rs_rd->rd_tam_ops->scan_gettuple_for_verify(sscan,
direction, isValidRelationPage);
return sscan->rs_rd->rd_tam_ops->scan_gettuple_for_verify(sscan, direction, isValidRelationPage);
}
static inline void tableam_scan_end(TableScanDesc sscan)
@ -1037,14 +1041,16 @@ extern TM_Result HeapamTupleUpdate(Relation relation, Relation parentRelation, I
* HEAP AM APIs
* ------------------------------------------------------------------------
*/
extern Tuple heap_slot_get_tuple_from_slot(TupleTableSlot* slot);
extern Datum heapam_getsysattr(Tuple tup, int attnum, TupleDesc tuple_desc, bool* isnull, Buffer buff);
extern Tuple heapam_form_tuple(TupleDesc tuple_descriptor, Datum* values, bool* isnull);
extern void heapam_deform_tuple(Tuple tuple, TupleDesc tuple_desc, Datum* values, bool* isnull);
extern Tuple heap_slot_get_tuple_from_slot(TupleTableSlot *slot);
extern Datum heapam_getsysattr(Tuple tup, int attnum, TupleDesc tuple_desc, bool *isnull, Buffer buff);
extern Tuple heapam_form_tuple(TupleDesc tuple_descriptor, Datum *values, bool *isnull);
extern void heapam_deform_tuple(Tuple tuple, TupleDesc tuple_desc, Datum *values, bool *isnull);
extern void heapam_deform_tuple2(Tuple tuple, TupleDesc tupleDesc, Datum *values, bool *isnull, Buffer buffer);
extern void heapam_deform_cmprs_tuple(Tuple tuple, TupleDesc tuple_desc, Datum* values, bool* isnull, char* cmprs_info);
extern void heapam_fill_tuple(TupleDesc tuple_desc, Datum* values, const bool* isnull, char* data, Size data_size, uint16* infomask, bits8* bit);
extern Tuple heapam_modify_tuple(Tuple tuple, TupleDesc tuple_desc, Datum* repl_values, const bool* repl_isnull, const bool* do_replace);
extern void heapam_deform_cmprs_tuple(Tuple tuple, TupleDesc tuple_desc, Datum *values, bool *isnull, char *cmprs_info);
extern void heapam_fill_tuple(TupleDesc tuple_desc, Datum *values, const bool *isnull, char *data, Size data_size,
uint16 *infomask, bits8 *bit);
extern Tuple heapam_modify_tuple(Tuple tuple, TupleDesc tuple_desc, Datum *repl_values, const bool *repl_isnull,
const bool *do_replace);
extern bool heapam_attisnull(Tuple tup, int attnum, TupleDesc tuple_desc);
extern Tuple heapam_copytuple(Tuple tuple);

View File

@ -170,7 +170,8 @@ typedef struct tupleDesc {
extern TupleDesc CreateTemplateTupleDesc(int natts, bool hasoid, const TableAmRoutine* tam_ops = TableAmHeap);
extern TupleDesc CreateTupleDesc(int natts, bool hasoid, Form_pg_attribute* attrs, const TableAmRoutine* tam_ops = TableAmHeap);
extern TupleDesc CreateTupleDesc(int natts, bool hasoid, Form_pg_attribute *attrs,
const TableAmRoutine *tam_ops = TableAmHeap);
extern TupleDesc CreateTupleDescCopy(TupleDesc tupdesc);

View File

@ -622,3 +622,4 @@ BEGIN
LANGUAGE 'plpgsql' NOT FENCED;
END IF;
END$DO$;

View File

@ -622,3 +622,4 @@ BEGIN
LANGUAGE 'plpgsql' NOT FENCED;
END IF;
END$DO$;

View File

@ -431,7 +431,6 @@ typedef enum en_dms_wait_event {
DMS_EVT_LATCH_X_REMOTE,
DMS_EVT_LATCH_S_REMOTE,
DMS_EVT_COUNT,
} dms_wait_event_t;

View File

@ -193,14 +193,15 @@ extern TupleHashEntry FindTupleHashEntry(
/*
* prototypes from functions in execJunk.c
*/
extern JunkFilter* ExecInitJunkFilter(List* targetList, bool hasoid, TupleTableSlot* slot, const TableAmRoutine* tam_ops);
extern void ExecInitJunkAttr(EState* estate, CmdType operation, List* targetlist, ResultRelInfo* result_rel_info);
extern JunkFilter* ExecInitJunkFilterConversion(List* targetList, TupleDesc cleanTupType, TupleTableSlot* slot);
extern AttrNumber ExecFindJunkAttribute(JunkFilter* junkfilter, const char* attrName);
extern AttrNumber ExecFindJunkAttributeInTlist(List* targetlist, const char* attrName);
extern Datum ExecGetJunkAttribute(TupleTableSlot* slot, AttrNumber attno, bool* isNull);
extern TupleTableSlot* ExecFilterJunk(JunkFilter* junkfilter, TupleTableSlot* slot);
extern void ExecSetjunkFilteDescriptor(JunkFilter* junkfilter, TupleDesc tupdesc);
extern JunkFilter *ExecInitJunkFilter(List *targetList, bool hasoid, TupleTableSlot *slot,
const TableAmRoutine *tam_ops);
extern void ExecInitJunkAttr(EState *estate, CmdType operation, List *targetlist, ResultRelInfo *result_rel_info);
extern JunkFilter *ExecInitJunkFilterConversion(List *targetList, TupleDesc cleanTupType, TupleTableSlot *slot);
extern AttrNumber ExecFindJunkAttribute(JunkFilter *junkfilter, const char *attrName);
extern AttrNumber ExecFindJunkAttributeInTlist(List *targetlist, const char *attrName);
extern Datum ExecGetJunkAttribute(TupleTableSlot *slot, AttrNumber attno, bool *isNull);
extern TupleTableSlot *ExecFilterJunk(JunkFilter *junkfilter, TupleTableSlot *slot);
extern void ExecSetjunkFilteDescriptor(JunkFilter *junkfilter, TupleDesc tupdesc);
#ifdef PGXC
extern List* ExecFindJunkPrimaryKeys(List* targetlist);
@ -290,17 +291,16 @@ static inline TupleTableSlot *ExecProcNode(PlanState *node)
node->ps_rownum++;
return result;
}
#else /*ENABLE_MULTIPLE_NODES*/
#else /* ENABLE_MULTIPLE_NODES */
static inline TupleTableSlot *ExecProcNode(PlanState *node)
{
//TODO: FIX ENABLE_MULTIPLE_NODES
return NULL;
}
#endif /*ENABLE_MULTIPLE_NODES*/
#endif /* ENABLE_MULTIPLE_NODES */
#endif /*FRONTEND*/
#endif /* FRONTEND */
/*
@ -333,17 +333,18 @@ extern bool is_huge_clob(Oid type_oid, bool is_null, Datum value);
/*
* prototypes from functions in execTuples.c
*/
extern void ExecInitResultTupleSlot(EState* estate, PlanState* planstate, const TableAmRoutine* tam_ops = TableAmHeap);
extern void ExecInitScanTupleSlot(EState* estate, ScanState* scanstate, const TableAmRoutine* tam_ops = TableAmHeap);
extern TupleTableSlot* ExecInitExtraTupleSlot(EState* estate, const TableAmRoutine* tam_ops = TableAmHeap);
extern TupleTableSlot* ExecInitNullTupleSlot(EState* estate, TupleDesc tupType);
extern TupleDesc ExecTypeFromTL(List* targetList, bool hasoid, bool markdropped = false, const TableAmRoutine* tam_ops = TableAmHeap);
extern TupleDesc ExecCleanTypeFromTL(List* targetList, bool hasoid, const TableAmRoutine* tam_ops = TableAmHeap);
extern TupleDesc ExecTypeFromExprList(List* exprList, List* namesList, const TableAmRoutine* tam_ops = TableAmHeap);
extern void UpdateChangedParamSet(PlanState* node, Bitmapset* newchg);
extern void InitOutputValues(RightRefState* refState, GenericExprState* targetArr[],
Datum* values, bool* isnull, int targetCount, bool* hasExecs);
extern void SortTargetListAsArray(RightRefState* refState, List* targetList, GenericExprState* targetArr[]);
extern void ExecInitResultTupleSlot(EState *estate, PlanState *planstate, const TableAmRoutine *tam_ops = TableAmHeap);
extern void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, const TableAmRoutine *tam_ops = TableAmHeap);
extern TupleTableSlot *ExecInitExtraTupleSlot(EState *estate, const TableAmRoutine *tam_ops = TableAmHeap);
extern TupleTableSlot *ExecInitNullTupleSlot(EState *estate, TupleDesc tupType);
extern TupleDesc ExecTypeFromTL(List *targetList, bool hasoid, bool markdropped = false,
const TableAmRoutine *tam_ops = TableAmHeap);
extern TupleDesc ExecCleanTypeFromTL(List *targetList, bool hasoid, const TableAmRoutine *tam_ops = TableAmHeap);
extern TupleDesc ExecTypeFromExprList(List *exprList, List *namesList, const TableAmRoutine *tam_ops = TableAmHeap);
extern void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg);
extern void InitOutputValues(RightRefState *refState, GenericExprState *targetArr[], Datum *values, bool *isnull,
int targetCount, bool *hasExecs);
extern void SortTargetListAsArray(RightRefState *refState, List *targetList, GenericExprState *targetArr[]);
typedef struct TupOutputState {
TupleTableSlot* slot;

View File

@ -128,9 +128,7 @@
#define TTS_FLAG_SLOW (1 << 4)
#define TTS_SLOW(slot) (((slot)->tts_flags & TTS_FLAG_SLOW) != 0)
/*
* openGauss flags
*/
/* openGauss flags */
/* should pfree should pfree tts_dataRow? */
#define TTS_FLAG_SHOULDFREE_ROW (1 << 12)
@ -165,7 +163,6 @@ typedef struct TupleTableSlot {
Oid tts_xcnodeoid; /* Oid of node from where the datarow is fetched */
MemoryContext tts_per_tuple_mcxt;
#endif
} TupleTableSlot;
#define TTS_HAS_PHYSICAL_TUPLE(slot) ((slot)->tts_tuple != NULL && (slot)->tts_tuple != &((slot)->tts_minhdr))

View File

@ -36,6 +36,7 @@ extern void print_stack(SIGNAL_ARGS);
void InitGsStack();
void get_stack_and_write_result();
void check_and_process_gs_stack();
void get_stack_according_to_tid(ThreadId tid, StringInfoData* call_stack);
NON_EXEC_STATIC void stack_perf_main();
#endif

View File

@ -2823,7 +2823,8 @@ typedef enum {
OLD_REPL_CHANGE_IP_OR_PORT,
ADD_REPL_CONN_INFO_WITH_OLD_LOCAL_IP_PORT,
ADD_REPL_CONN_INFO_WITH_NEW_LOCAL_IP_PORT,
ADD_DISASTER_RECOVERY_INFO
ADD_DISASTER_RECOVERY_INFO,
REMOVE_DISASTER_RECOVERY_INFO,
} ReplConnInfoChangeType;

View File

@ -146,7 +146,8 @@ extern bool contain_backend_version(uint32 version_number);
((u_sess->utils_cxt.b_format_behavior_compat_flags & B_FORMAT_OPT_ENABLE_SET_SESSION_TRANSACTION) && \
u_sess->attr.attr_sql.sql_compatibility == B_FORMAT)
#define ENABLE_SET_VARIABLES (u_sess->utils_cxt.b_format_behavior_compat_flags & B_FORMAT_OPT_ENABLE_SET_VARIABLES)
#define USE_DEFAULT_COLLATION (u_sess->utils_cxt.b_format_behavior_compat_flags & B_FORMAT_OPT_DEFAULT_COLLATION)
#define USE_DEFAULT_COLLATION (u_sess->utils_cxt.b_format_behavior_compat_flags & B_FORMAT_OPT_DEFAULT_COLLATION && \
t_thrd.proc->workingVersionNum >= CHARACTER_SET_VERSION_NUM && u_sess->attr.attr_common.upgrade_mode == 0)
#define ENABLE_MODIFY_COLUMN \
((u_sess->utils_cxt.b_format_behavior_compat_flags & B_FORMAT_OPT_ENABLE_MODIFY_COLUMN) && \
u_sess->attr.attr_sql.sql_compatibility == B_FORMAT)

View File

@ -2309,7 +2309,7 @@ typedef struct HashJoinState {
bool hj_OuterNotEmpty;
bool hj_streamBothSides;
bool hj_rebuildHashtable;
List* hj_hash_collations; /* list of collations OIDs */
List* hj_hashCollations; /* list of collations OIDs */
} HashJoinState;
/* ----------------------------------------------------------------

View File

@ -271,10 +271,10 @@ struct ParseState {
*/
List* p_updateRangeVars; /* For multiple-update, use relationClase to generate RangeVar list. */
RightRefState* rightRefState;
RightRefState* rightRefState;
/*
* whether to record the columns referenced by the ORDER BY statement
* whether to record the columns referenced by the ORDER BY statement
* when transforming the SortClause.
*/
bool shouldCheckOrderbyCol;

View File

@ -245,7 +245,6 @@ typedef struct BufferDesc {
* platform with either 32 or 128 byte line sizes, it's good to align to
* boundaries and avoid false sharing.
*/
//#define BUFFERDESC_PAD_TO_SIZE (SIZEOF_VOID_P == 8 ? 128 : 1)
#define BUFFERDESC_PAD_TO_SIZE (SIZEOF_VOID_P == 8 ? 64 : 1)
typedef union BufferDescPadded {

View File

@ -353,6 +353,9 @@ typedef struct PGXACT {
/* the offset of the last padding if exists*/
#define PROC_HDR_PAD_OFFSET 112
/* max number of CMA's connections */
#define NUM_CMAGENT_PROCS (10)
/*
* There is one ProcGlobal struct for the whole database cluster.
*/
@ -373,6 +376,8 @@ typedef struct PROC_HDR {
PGPROC* autovacFreeProcs;
/* Head of list of cm agent's free PGPROC structures */
PGPROC* cmAgentFreeProcs;
/* Head of list of cm agent's all PGPROC structures */
PGPROC* cmAgentAllProcs[NUM_CMAGENT_PROCS];
/* Head of list of pg_job's free PGPROC structures */
PGPROC* pgjobfreeProcs;
/* Head of list of bgworker free PGPROC structures */
@ -435,8 +440,6 @@ const int MAX_COMPACTION_THREAD_NUM = 10;
#define NUM_AUXILIARY_PROCS (NUM_SINGLE_AUX_PROC + NUM_MULTI_AUX_PROC)
/* max number of CMA's connections */
#define NUM_CMAGENT_PROCS (10)
/* buffer length of information when no free proc available for cm_agent */
#define CONNINFOLEN (64)

View File

@ -49,7 +49,7 @@ typedef struct processutility_context {
} processutility_context;
/* Hook for plugins to get control in ProcessUtility() */
typedef void (*ProcessUtility_hook_type)(processutility_context* processutility_cxt,
typedef void (*ProcessUtility_hook_type)(processutility_context* processutility_cxt,
DestReceiver* dest,
#ifdef PGXC
bool sentToRemote,

View File

@ -95,17 +95,19 @@
*/
#define NUMERIC_DSCALE_MASK 0x3FFF
#define NUMERIC_SIGN(n) \
(NUMERIC_HEADER_IS_SHORT(n) ? (((n)->choice.n_short.n_header & NUMERIC_SHORT_SIGN_MASK) ? NUMERIC_NEG : NUMERIC_POS) \
: NUMERIC_FLAGBITS(n))
#define NUMERIC_DSCALE(n) \
(NUMERIC_HEADER_IS_SHORT((n)) ? ((n)->choice.n_short.n_header & NUMERIC_SHORT_DSCALE_MASK) >> NUMERIC_SHORT_DSCALE_SHIFT \
: ((n)->choice.n_long.n_sign_dscale & NUMERIC_DSCALE_MASK))
#define NUMERIC_WEIGHT(n) \
(NUMERIC_HEADER_IS_SHORT((n)) \
? (((n)->choice.n_short.n_header & NUMERIC_SHORT_WEIGHT_SIGN_MASK ? ~NUMERIC_SHORT_WEIGHT_MASK : 0) | \
((n)->choice.n_short.n_header & NUMERIC_SHORT_WEIGHT_MASK)) \
: ((n)->choice.n_long.n_weight))
#define NUMERIC_SIGN(n) \
(NUMERIC_HEADER_IS_SHORT(n) \
? (((n)->choice.n_short.n_header & NUMERIC_SHORT_SIGN_MASK) ? NUMERIC_NEG : NUMERIC_POS) \
: NUMERIC_FLAGBITS(n))
#define NUMERIC_DSCALE(n) \
(NUMERIC_HEADER_IS_SHORT((n)) \
? ((n)->choice.n_short.n_header & NUMERIC_SHORT_DSCALE_MASK) >> NUMERIC_SHORT_DSCALE_SHIFT \
: ((n)->choice.n_long.n_sign_dscale & NUMERIC_DSCALE_MASK))
#define NUMERIC_WEIGHT(n) \
(NUMERIC_HEADER_IS_SHORT((n)) \
? (((n)->choice.n_short.n_header & NUMERIC_SHORT_WEIGHT_SIGN_MASK ? ~NUMERIC_SHORT_WEIGHT_MASK : 0) | \
((n)->choice.n_short.n_header & NUMERIC_SHORT_WEIGHT_MASK)) \
: ((n)->choice.n_long.n_weight))
#define NUMERIC_DIGITS(num) (NUMERIC_HEADER_IS_SHORT(num) ? (num)->choice.n_short.n_data : (num)->choice.n_long.n_data)
#define NUMERIC_NDIGITS(num) ((VARSIZE(num) - NUMERIC_HEADER_SIZE(num)) / sizeof(NumericDigit))

View File

@ -263,32 +263,32 @@ typedef struct HashPartitionMap {
} \
} while (0)
#define partitionRoutingForValueEqual(rel, keyValue, valueLen, topClosed, result) \
do { \
(keyValue) = transformConstIntoPartkeyType(((rel)->rd_att->attrs), GetPartitionKey((rel)->partMap), (keyValue), \
(valueLen)); \
if ((rel)->partMap->type == PART_TYPE_LIST) { \
(result)->partArea = PART_AREA_LIST; \
(result)->partitionId = \
getListPartitionOid(((rel)->partMap), (keyValue), (valueLen), &((result)->partSeq), topClosed); \
if ((result)->partSeq < 0) { \
(result)->fileExist = false; \
} else { \
(result)->fileExist = true; \
} \
} else if ((rel)->partMap->type == PART_TYPE_HASH) { \
(result)->partArea = PART_AREA_HASH; \
(result)->partitionId = \
getHashPartitionOid(((rel)->partMap), (keyValue), &((result)->partSeq), topClosed); \
if ((result)->partSeq < 0) { \
(result)->fileExist = false; \
} else { \
(result)->fileExist = true; \
} \
} else { \
ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR), \
errmsg("Unsupported partition strategy:%d", (rel)->partMap->type))); \
} \
#define partitionRoutingForValueEqual(rel, keyValue, valueLen, topClosed, result) \
do { \
(keyValue) = transformConstIntoPartkeyType(((rel)->rd_att->attrs), GetPartitionKey((rel)->partMap), \
(keyValue), (valueLen)); \
if ((rel)->partMap->type == PART_TYPE_LIST) { \
(result)->partArea = PART_AREA_LIST; \
(result)->partitionId = \
getListPartitionOid(((rel)->partMap), (keyValue), (valueLen), &((result)->partSeq), topClosed); \
if ((result)->partSeq < 0) { \
(result)->fileExist = false; \
} else { \
(result)->fileExist = true; \
} \
} else if ((rel)->partMap->type == PART_TYPE_HASH) { \
(result)->partArea = PART_AREA_HASH; \
(result)->partitionId = \
getHashPartitionOid(((rel)->partMap), (keyValue), &((result)->partSeq), topClosed); \
if ((result)->partSeq < 0) { \
(result)->fileExist = false; \
} else { \
(result)->fileExist = true; \
} \
} else { \
ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR), \
errmsg("Unsupported partition strategy:%d", (rel)->partMap->type))); \
} \
} while (0)
typedef enum PruningResultState { PRUNING_RESULT_EMPTY, PRUNING_RESULT_SUBSET, PRUNING_RESULT_FULL } PruningResultState;

View File

@ -1590,7 +1590,7 @@ extern PLpgSQL_variable* plpgsql_build_variable(const char* refname, int lineno,
PLpgSQL_variable* plpgsql_build_varrayType(const char* refname, int lineno, PLpgSQL_type* dtype, bool add2namespace);
PLpgSQL_variable* plpgsql_build_tableType(const char* refname, int lineno, PLpgSQL_type* dtype, bool add2namespace);
extern PLpgSQL_rec_type* plpgsql_build_rec_type(const char* typname, int lineno, List* list, bool add2namespace);
extern PLpgSQL_rec* plpgsql_build_record(const char* refname, int lineno, bool add2namespace);
extern PLpgSQL_rec* plpgsql_build_record(const char* refname, int lineno, bool add2namespace, TupleDesc tupleDesc);
extern int plpgsql_recognize_err_condition(const char* condname, bool allow_sqlstate);
extern PLpgSQL_condition* plpgsql_parse_err_condition(char* condname);
extern PLpgSQL_condition* plpgsql_parse_err_condition_b(const char* condname);