aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/analyze.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/analyze.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/analyze.c')
-rw-r--r--src/backend/commands/analyze.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 94e1971a4df..34bb0be1516 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.84 2005/03/21 01:24:02 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.85 2005/04/14 20:03:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,7 +19,6 @@
#include "access/heapam.h"
#include "access/tuptoaster.h"
#include "catalog/catalog.h"
-#include "catalog/catname.h"
#include "catalog/index.h"
#include "catalog/indexing.h"
#include "catalog/namespace.h"
@@ -187,8 +186,7 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt)
/*
* We can ANALYZE any table except pg_statistic. See update_attstats
*/
- if (IsSystemNamespace(RelationGetNamespace(onerel)) &&
- strcmp(RelationGetRelationName(onerel), StatisticRelationName) == 0)
+ if (RelationGetRelid(onerel) == StatisticRelationId)
{
relation_close(onerel, AccessShareLock);
return;
@@ -1091,7 +1089,7 @@ update_attstats(Oid relid, int natts, VacAttrStats **vacattrstats)
if (natts <= 0)
return; /* nothing to do */
- sd = heap_openr(StatisticRelationName, RowExclusiveLock);
+ sd = heap_open(StatisticRelationId, RowExclusiveLock);
for (attno = 0; attno < natts; attno++)
{