[PATCH] Cleanup: use heap_open/heap_close consistently

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Cleanup: use heap_open/heap_close consistently
Date: 2012-02-27 10:45:38
Message-ID: CABRT9RDK9ZJsXaG1rXWB3n5oorEtThiMQe_GQ2rYtwRRS3=ZFg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
heap_close-cleanup.patch text/x-patch 394 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Asif Rehman 2012-02-27 11:49:52 Re: Patch to allow domains over composite types
Previous Message Miroslav Šimulčík 2012-02-27 10:35:44 restrict modification of column values in BR triggers