[PATCH] Cleanup: use heap_open/heap_close consistently - Mailing list pgsql-hackers

From Marti Raudsepp
Subject [PATCH] Cleanup: use heap_open/heap_close consistently
Date
Msg-id CABRT9RDK9ZJsXaG1rXWB3n5oorEtThiMQe_GQ2rYtwRRS3=ZFg@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] Cleanup: use heap_open/heap_close consistently
List pgsql-hackers
Hi,

Here's a tiny cleanup: currently get_tables_to_cluster uses
heap_open() to open the relation, but then closes it with
relation_close(). Currently relation_close=heap_close, but it seems
like good idea to be consistent -- in case these functions need to
diverge in the future.

Regards,
Marti

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 349d130..a10ec2d 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -1551,7 +1551,7 @@ get_tables_to_cluster(MemoryContext cluster_context)
     }
     heap_endscan(scan);

-    relation_close(indRelation, AccessShareLock);
+    heap_close(indRelation, AccessShareLock);

     return rvs;
 }

Attachment

pgsql-hackers by date:

Previous
From: Miroslav Šimulčík
Date:
Subject: restrict modification of column values in BR triggers
Next
From: Asif Rehman
Date:
Subject: Re: Patch to allow domains over composite types