Fix conflict.

This commit is contained in:
totaj
2024-04-11 16:13:53 +08:00
parent 69de0a8d00
commit ccb89c54dd
4 changed files with 7 additions and 6 deletions

View File

@ -7508,7 +7508,7 @@ Oid getPartitionIdFromTuple(Relation rel, void *tuple, EState* estate, TupleTabl
targetOid = heapTupleGetPartitionId(rel, tuple, partitionno, isDDL, canIgnore);
} else {
PartKeyExprResult partKeyExprResult = ComputePartKeyExprTuple(rel, estate, slot, NULL, partExprKeyStr);
targetOid = heapTupleGetPartitionOid(rel, (void*)(&partKeyExprResult), partitionno, isDDL, canIgnore, false);
targetOid = heapTupleGetPartitionId(rel, (void*)(&partKeyExprResult), partitionno, isDDL, canIgnore, false);
}
pfree_ext(partExprKeyStr);
return targetOid;

View File

@ -828,6 +828,8 @@ void StorePreparedStatement(const char* stmt_name, CachedPlanSource* plansource,
StorePreparedStatementCNGPC(stmt_name, plansource, from_sql, false);
return;
}
PreparedStatement* entry = NULL;
TimestampTz cur_ts = GetCurrentStatementStartTimestamp();
bool found = false;
/* Initialize the hash table, if necessary */

View File

@ -1372,7 +1372,7 @@ TupleTableSlot* ExecInsertT(ModifyTableState* state, TupleTableSlot* slot, Tuple
if (partExprKeyStr) {
PartKeyExprResult partKeyExprTuple = ComputePartKeyExprTuple(result_relation_desc, estate,
slot, NULL, partExprKeyStr);
partition_id = heapTupleGetPartitionOid(result_relation_desc, (void *) (&partKeyExprTuple),
partition_id = heapTupleGetPartitionId(result_relation_desc, (void *) (&partKeyExprTuple),
&partitionno,
false, estate->es_plannedstmt->hasIgnore, false);
} else {
@ -1440,7 +1440,7 @@ TupleTableSlot* ExecInsertT(ModifyTableState* state, TupleTableSlot* slot, Tuple
if (partExprKeyStr) {
PartKeyExprResult partKeyExprTuple = ComputePartKeyExprTuple(result_relation_desc, estate,
slot, NULL, partExprKeyStr);
partitionId = heapTupleGetPartitionOid(result_relation_desc, (void *) (&partKeyExprTuple),
partitionId = heapTupleGetPartitionId(result_relation_desc, (void *) (&partKeyExprTuple),
&partitionno,
false, estate->es_plannedstmt->hasIgnore, false);
} else {
@ -1468,7 +1468,7 @@ TupleTableSlot* ExecInsertT(ModifyTableState* state, TupleTableSlot* slot, Tuple
bool subpartExprKeyIsNull = PartExprKeyIsNull(partRel, NULL, &subpartExprKeyStr);
if (!subpartExprKeyIsNull) {
PartKeyExprResult partKeyExprTuple = ComputePartKeyExprTuple(result_relation_desc, estate, slot, partRel, subpartExprKeyStr);
subPartitionId = heapTupleGetPartitionOid(partRel, (void *)(&partKeyExprTuple), &subpartitionno, false,
subPartitionId = heapTupleGetPartitionId(partRel, (void *)(&partKeyExprTuple), &subpartitionno, false,
estate->es_plannedstmt->hasIgnore, false);
} else {
subPartitionId = heapTupleGetPartitionId(partRel, tuple, &subpartitionno, false,

View File

@ -164,9 +164,8 @@ typedef struct HashPartitionMap {
values[i] = \
transformDatum2Const((rel)->rd_att, partkey_column->values[i], column_raw, isnull, &consts[i]); \
} else { \
column_raw = Datum(tuple); \
values[i] = \
transformDatum2ConstForPartKeyExpr((rel)->partMap, column_raw, isnull, &consts[i]); \
transformDatum2ConstForPartKeyExpr((rel)->partMap, (PartKeyExprResult*)tuple, &consts[i]); \
} \
} \
if (PartitionMapIsInterval((rel)->partMap) && values[0]->constisnull) { \