Skip to content

Commit 65f77f4

Browse files
e-ivkovza-arthur
authored andcommitted
Fix formatting for amreuse call
1 parent 916a946 commit 65f77f4

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/backend/commands/tablecmds.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14316,14 +14316,14 @@ TryReuseIndex(Oid oldId, IndexStmt *stmt)
1431614316
Form_pg_am accessMethodForm;
1431714317
IndexAmRoutine *amRoutine;
1431814318
char *accessMethodName;
14319-
Oid heapRelId = IndexGetRelation(oldId, false);
14320-
Relation heapRel = table_open(heapRelId, ShareLock);
14321-
14319+
Oid heapRelId = IndexGetRelation(oldId, false);
14320+
Relation heapRel = table_open(heapRelId, ShareLock);
14321+
1432214322
stmt->oldNumber = irel->rd_locator.relNumber;
1432314323
stmt->oldCreateSubid = irel->rd_createSubid;
1432414324
stmt->oldFirstRelfilelocatorSubid = irel->rd_firstRelfilelocatorSubid;
14325-
14326-
14325+
14326+
1432714327
/*
1432814328
* look up the access method to call amreuse
1432914329
*/
@@ -14332,8 +14332,9 @@ TryReuseIndex(Oid oldId, IndexStmt *stmt)
1433214332
if (!HeapTupleIsValid(tuple))
1433314333
{
1433414334
/*
14335-
* Hack to provide more-or-less-transparent updating of old RTREE
14336-
* indexes to GiST: if RTREE is requested and not found, use GIST.
14335+
* Hack to provide more-or-less-transparent updating of old
14336+
* RTREE indexes to GiST: if RTREE is requested and not found,
14337+
* use GIST.
1433714338
*/
1433814339
if (strcmp(accessMethodName, "rtree") == 0)
1433914340
{
@@ -14353,9 +14354,10 @@ TryReuseIndex(Oid oldId, IndexStmt *stmt)
1435314354
amRoutine = GetIndexAmRoutineWithTableAM(heapRel->rd_rel->relam, accessMethodForm->amhandler);
1435414355
ReleaseSysCache(tuple);
1435514356
table_close(heapRel, NoLock);
14356-
14357-
if(amRoutine->amreuse) {
14358-
(*amRoutine->amreuse)(irel);
14357+
14358+
if (amRoutine->amreuse)
14359+
{
14360+
(*amRoutine->amreuse) (irel);
1435914361
}
1436014362
}
1436114363
index_close(irel, NoLock);

0 commit comments

Comments
 (0)