Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 01b88b4

Browse files
MERGE minor errata
1 parent 3af7b2b commit 01b88b4

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/backend/executor/README

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ consists of a super-row that contains all the columns needed by any of the
4242
individual actions, plus CTID and TABLEOID junk columns. The CTID column is
4343
required to know if a matching target row was found or not and the TABLEOID
4444
column is needed to find the underlying target partition, in case when the
45-
target table is a partition table. When a matching target tuple is found, the
46-
CTID column identifies the matching target tuple and we attempt to activate
45+
target table is a partitioned table. When a matching target tuple is found,
46+
the CTID column identifies the matching tuple and we attempt to activate
4747
WHEN MATCHED actions. If a matching tuple is not found, then CTID column is
4848
NULL and we attempt to activate WHEN NOT MATCHED actions. Once we know which
4949
action is activated we form the final result row and apply only those changes.

src/backend/executor/execMerge.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ExecMerge(ModifyTableState *mtstate, EState *estate, TupleTableSlot *slot,
5151
Datum datum;
5252
bool isNull;
5353

54-
Assert(resultRelInfo->ri_RelationDesc->rd_rel->relkind ||
54+
Assert(resultRelInfo->ri_RelationDesc->rd_rel->relkind == RELKIND_RELATION ||
5555
resultRelInfo->ri_RelationDesc->rd_rel->relkind == RELKIND_PARTITIONED_TABLE);
5656

5757
/*

src/backend/executor/execPartition.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,7 @@ ExecFindPartition(ResultRelInfo *resultRelInfo, PartitionDispatch *pd,
314314
* Given OID of the partition leaf, return the index of the leaf in the
315315
* partition hierarchy.
316316
*
317-
* NB: This is an O(N) operation. Unfortunately, there are many other problem
318-
* areas with more than a handful partitions, so we don't try to optimise this
319-
* code right now.
317+
* XXX This is an O(N) operation and further optimization would be beneficial
320318
*/
321319
int
322320
ExecFindPartitionByOid(PartitionTupleRouting *proute, Oid partoid)

0 commit comments

Comments
 (0)