From fc955b14ea667e04475e2b7339c8445611470771 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 22 Nov 1999 17:56:41 +0000 Subject: Add system indexes to match all caches. Make all system indexes unique. Make all cache loads use system indexes. Rename *rel to *relid in inheritance tables. Rename cache names to be clearer. --- src/backend/commands/creatinh.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/backend/commands/creatinh.c') diff --git a/src/backend/commands/creatinh.c b/src/backend/commands/creatinh.c index 491f3f642f3..6d7ceab1a18 100644 --- a/src/backend/commands/creatinh.c +++ b/src/backend/commands/creatinh.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.51 1999/11/07 23:08:02 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.52 1999/11/22 17:56:01 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -342,7 +342,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr) * form name, type and constraints */ attributeName = NameStr(attribute->attname); - tuple = SearchSysCacheTuple(TYPOID, + tuple = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(attribute->atttypid), 0, 0, 0); Assert(HeapTupleIsValid(tuple)); @@ -495,6 +495,16 @@ StoreCatalogInheritance(Oid relationId, List *supers) tuple = heap_formtuple(desc, datum, nullarr); heap_insert(relation, tuple); + + if (RelationGetForm(relation)->relhasindex) + { + Relation idescs[Num_pg_inherits_indices]; + + CatalogOpenIndices(Num_pg_inherits_indices, Name_pg_inherits_indices, idescs); + CatalogIndexInsert(idescs, Num_pg_inherits_indices, relation, tuple); + CatalogCloseIndices(Num_pg_inherits_indices, idescs); + } + pfree(tuple); seqNumber += 1; -- cgit v1.2.3