B库下非严格模式时支持往非空约束列插入空值

This commit is contained in:
chenxiaobin19
2024-04-18 09:48:02 +08:00
committed by yaoxin
parent d50c38d2d2
commit 223fcbe3e9
6 changed files with 35 additions and 17 deletions

View File

@ -222,7 +222,8 @@ extern void InitResultRelInfo(
ResultRelInfo* resultRelInfo, Relation resultRelationDesc, Index resultRelationIndex, int instrument_options);
extern ResultRelInfo* ExecGetTriggerResultRel(EState* estate, Oid relid);
extern bool ExecContextForcesOids(PlanState* planstate, bool* hasoids);
extern bool ExecConstraints(ResultRelInfo* resultRelInfo, TupleTableSlot* slot, EState* estate, bool skipAutoInc = false);
extern bool ExecConstraints(ResultRelInfo* resultRelInfo, TupleTableSlot* slot, EState* estate,
bool skipAutoInc = false, bool replaceNull = false);
extern void ExecWithCheckOptions(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate);
extern ExecRowMark* ExecFindRowMark(EState* estate, Index rti);
extern ExecAuxRowMark* ExecBuildAuxRowMark(ExecRowMark* erm, List* targetlist);
@ -721,6 +722,14 @@ extern Tuple ReplaceTupleNullCol(TupleDesc tupleDesc, TupleTableSlot* slot);
extern Datum ExecEvalArrayRef(ArrayRefExprState* astate, ExprContext* econtext, bool* isNull, ExprDoneCond* isDone);
extern int ResourceOwnerForgetIfExistPthreadMutex(ResourceOwner owner, pthread_mutex_t* pMutex, bool trace);
typedef bool (*replaceNullOrNotFunc)();
extern inline bool CheckPluginReplaceNull()
{
return u_sess->hook_cxt.replaceNullOrNotHook != NULL ?
((replaceNullOrNotFunc)(u_sess->hook_cxt.replaceNullOrNotHook))() : false;
}
// AutoMutexLock
// Auto object for non-recursive pthread_mutex_t lock
//

View File

@ -50,7 +50,8 @@ extern TupleTableSlot* ExecUpdate(ItemPointer tupleid, Oid oldPartitionOid, int2
template <bool useHeapMultiInsert>
extern TupleTableSlot* ExecInsertT(ModifyTableState* state, TupleTableSlot* slot, TupleTableSlot* planSlot,
EState* estate, bool canSetTag, int options, List** partitionList, char* partExprKeyStr = NULL);
EState* estate, bool canSetTag, int options, List** partitionList, char* partExprKeyStr = NULL,
bool replaceNull = false);
template <bool useHeapMultiInsert>
extern TupleTableSlot *
ExecHBucketInsertT(ModifyTableState* state, TupleTableSlot *slot,