aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/cluster.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-04-14 20:03:27 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-04-14 20:03:27 +0000
commit162bd08b3f2e6783d1d75ae79f86fc444d34a28d (patch)
tree0220cd8a906557db64763a1a57dd339de313d221 /src/backend/commands/cluster.c
parent9dc2e6deaf66f97ff9157478a517d0f48a1e5060 (diff)
downloadpostgresql-162bd08b3f2e6783d1d75ae79f86fc444d34a28d.tar.gz
postgresql-162bd08b3f2e6783d1d75ae79f86fc444d34a28d.zip
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.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 553a8420699..e1c5a0ef778 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.135 2005/04/14 01:38:16 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.136 2005/04/14 20:03:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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,