summaryrefslogtreecommitdiff
path: root/src/backend/commands/cluster.c
diff options
context:
space:
mode:
authorTom Lane2005-04-14 20:03:27 +0000
committerTom Lane2005-04-14 20:03:27 +0000
commit5abc360d6c468b01971330a567d43a428cd0beda (patch)
treee7e8931cc67896c837039a916236168628c3d757 /src/backend/commands/cluster.c
parent5e236b7caf7d09351e07f1847738fcf38fd587f8 (diff)
Completion of project to use fixed OIDs for all system catalogs and
indexes. Replace all heap_openr and index_openr calls by heap_open and index_open. Remove runtime lookups of catalog OID numbers in various places. Remove relcache's support for looking up system catalogs by name. Bulky but mostly very boring patch ...
Diffstat (limited to 'src/backend/commands/cluster.c')
-rw-r--r--src/backend/commands/cluster.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index dc450f1eaf..0858a3c567 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -20,7 +20,6 @@
#include "access/genam.h"
#include "access/heapam.h"
#include "catalog/catalog.h"
-#include "catalog/catname.h"
#include "catalog/dependency.h"
#include "catalog/heap.h"
#include "catalog/index.h"
@@ -434,7 +433,7 @@ mark_index_clustered(Relation rel, Oid indexOid)
/*
* Check each index of the relation and set/clear the bit as needed.
*/
- pg_index = heap_openr(IndexRelationName, RowExclusiveLock);
+ pg_index = heap_open(IndexRelationId, RowExclusiveLock);
foreach(index, RelationGetIndexList(rel))
{
@@ -719,7 +718,7 @@ swap_relation_files(Oid r1, Oid r2)
CatalogIndexState indstate;
/* We need writable copies of both pg_class tuples. */
- relRelation = heap_openr(RelationRelationName, RowExclusiveLock);
+ relRelation = heap_open(RelationRelationId, RowExclusiveLock);
reltup1 = SearchSysCacheCopy(RELOID,
ObjectIdGetDatum(r1),
@@ -883,7 +882,7 @@ get_tables_to_cluster(MemoryContext cluster_context)
* ever have indisclustered set, because CLUSTER will refuse to set it
* when called with one of them as argument.
*/
- indRelation = relation_openr(IndexRelationName, AccessShareLock);
+ indRelation = heap_open(IndexRelationId, AccessShareLock);
ScanKeyInit(&entry,
Anum_pg_index_indisclustered,
BTEqualStrategyNumber, F_BOOLEQ,