1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

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 ...
This commit is contained in:
Tom Lane
2005-04-14 20:03:27 +00:00
parent 9dc2e6deaf
commit 162bd08b3f
71 changed files with 692 additions and 1228 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.28 2005/01/27 23:23:55 neilc Exp $
* $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.29 2005/04/14 20:03:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -16,7 +16,6 @@
#include "access/heapam.h"
#include "catalog/catalog.h"
#include "catalog/catname.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/namespace.h"
@ -189,7 +188,7 @@ RemoveSchema(List *names, DropBehavior behavior)
* Do the deletion. Objects contained in the schema are removed by
* means of their dependency links to the schema.
*/
object.classId = get_system_catalog_relid(NamespaceRelationName);
object.classId = NamespaceRelationId;
object.objectId = namespaceId;
object.objectSubId = 0;
@ -206,7 +205,7 @@ RemoveSchemaById(Oid schemaOid)
Relation relation;
HeapTuple tup;
relation = heap_openr(NamespaceRelationName, RowExclusiveLock);
relation = heap_open(NamespaceRelationId, RowExclusiveLock);
tup = SearchSysCache(NAMESPACEOID,
ObjectIdGetDatum(schemaOid),
@ -232,7 +231,7 @@ RenameSchema(const char *oldname, const char *newname)
Relation rel;
AclResult aclresult;
rel = heap_openr(NamespaceRelationName, RowExclusiveLock);
rel = heap_open(NamespaceRelationId, RowExclusiveLock);
tup = SearchSysCacheCopy(NAMESPACENAME,
CStringGetDatum(oldname),
@ -287,7 +286,7 @@ AlterSchemaOwner(const char *name, AclId newOwnerSysId)
Relation rel;
Form_pg_namespace nspForm;
rel = heap_openr(NamespaceRelationName, RowExclusiveLock);
rel = heap_open(NamespaceRelationId, RowExclusiveLock);
tup = SearchSysCache(NAMESPACENAME,
CStringGetDatum(name),