diff options
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index c33a5a5888a..78b0829ffc4 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -20875,7 +20875,7 @@ GetAttributeStorage(Oid atttypid, const char *storagemode) } /* - * Struct with context of new partition for insert rows from splited partition + * Struct with context of new partition for inserting rows from split partition */ typedef struct SplitPartitionContext { @@ -20932,7 +20932,7 @@ deleteSplitPartitionContext(SplitPartitionContext *pc, int ti_options) * * New partitions description: * partlist: list of pointers to SinglePartitionSpec structures. - * newPartRels: list of Relation's. + * newPartRels: list of Relations. * defaultPartOid: oid of DEFAULT partition, for table rel. */ static void @@ -21017,7 +21017,7 @@ moveSplitTableRows(Relation rel, Relation splitRel, List *partlist, List *newPar /* * Map computing for moving attributes of split partition to new partition - * (for first new partition but other new partitions can use the same + * (for first new partition, but other new partitions can use the same * map). */ pc = (SplitPartitionContext *) lfirst(list_head(partContexts)); @@ -21071,7 +21071,7 @@ moveSplitTableRows(Relation rel, Relation splitRel, List *partlist, List *newPar if (tuple_map) { - /* Need to use map for copy attributes. */ + /* Need to use map to copy attributes. */ insertslot = execute_attr_map_slot(tuple_map->attrMap, srcslot, pc->dstslot); } else @@ -21226,8 +21226,8 @@ ATExecSplitPartition(List **wqueue, AlteredTableInfo *tab, Relation rel, RangeVarGetAndCheckCreationNamespace(sps->name, NoLock, NULL); /* - * This would fail later on anyway, if the relation already exists. - * But by catching it here we can emit a nicer error message. + * This would fail later on anyway if the relation already exists. But + * by catching it here we can emit a nicer error message. */ existing_relid = get_relname_relid(relname, namespaceId); if (existing_relid == splitRelOid && !isSameName) @@ -21293,7 +21293,10 @@ ATExecSplitPartition(List **wqueue, AlteredTableInfo *tab, Relation rel, SinglePartitionSpec *sps = (SinglePartitionSpec *) lfirst(listptr); Relation newPartRel = (Relation) lfirst(listptr2); - /* wqueue = NULL: verification for each cloned constraint is not need. */ + /* + * wqueue = NULL: verification for each cloned constraint is not + * needed. + */ attachPartitionTable(NULL, rel, newPartRel, sps->bound); /* Keep the lock until commit. */ table_close(newPartRel, NoLock); @@ -21366,7 +21369,7 @@ moveMergedTablesRows(Relation rel, List *mergingPartitionsList, if (tuple_map) { - /* Need to use map for copy attributes. */ + /* Need to use map to copy attributes. */ insertslot = execute_attr_map_slot(tuple_map->attrMap, srcslot, dstslot); } else @@ -21465,7 +21468,7 @@ ATExecMergePartitions(List **wqueue, AlteredTableInfo *tab, Relation rel, /* Create table for new partition, use partitioned table as model. */ if (isSameName) { - /* Create partition table with generated temparary name. */ + /* Create partition table with generated temporary name. */ sprintf(tmpRelName, "merge-%u-%X-tmp", RelationGetRelid(rel), MyProcPid); mergePartName = makeRangeVar(get_namespace_name(RelationGetNamespace(rel)), tmpRelName, -1); |