1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-07 19:06:32 +03:00

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.
This commit is contained in:
Bruce Momjian
1999-11-22 17:56:41 +00:00
parent e30c2d67ef
commit fc955b14ea
75 changed files with 1265 additions and 634 deletions

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/xfunc.c,v 1.10 1999/09/21 20:58:13 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/xfunc.c,v 1.11 1999/11/22 17:56:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -494,7 +494,7 @@ xfunc_func_expense(LispValue node, LispValue args)
funcid = get_funcid((Func) node);
/* look up tuple in cache */
tupl = SearchSysCacheTuple(PROOID,
tupl = SearchSysCacheTuple(PROCOID,
ObjectIdGetDatum(funcid),
0, 0, 0);
if (!HeapTupleIsValid(tupl))
@@ -609,7 +609,7 @@ xfunc_width(LispValue clause)
else if (IsA(clause, Var))
{
/* base case: width is width of this attribute */
tupl = SearchSysCacheTuple(TYPOID,
tupl = SearchSysCacheTuple(TYPEOID,
ObjectIdGetDatum(get_vartype((Var) clause)),
0, 0, 0);
if (!HeapTupleIsValid(tupl))
@@ -672,7 +672,7 @@ xfunc_width(LispValue clause)
* * get function associated with this Oper, and treat this as * a
* Func
*/
tupl = SearchSysCacheTuple(OPROID,
tupl = SearchSysCacheTuple(OPEROID,
ObjectIdGetDatum(get_opno((Oper) get_op(clause))),
0, 0, 0);
if (!HeapTupleIsValid(tupl))
@@ -1303,7 +1303,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
/* lookup function and find its return type */
Assert(RegProcedureIsValid(funcid));
tupl = SearchSysCacheTuple(PROOID,
tupl = SearchSysCacheTuple(PROCOID,
ObjectIdGetDatum(funcid),
0, 0, 0);
if (!HeapTupleIsValid(tupl))
@@ -1321,7 +1321,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
else
/* function returns a base type */
{
tupl = SearchSysCacheTuple(TYPOID,
tupl = SearchSysCacheTuple(TYPEOID,
ObjectIdGetDatum(proc->prorettype),
0, 0, 0);
if (!HeapTupleIsValid(tupl))

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.72 1999/09/18 19:06:54 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.73 1999/11/22 17:56:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1893,7 +1893,7 @@ prefix_quals(Var *leftop, Oid expr_op,
*/
if (pstatus == Prefix_Exact)
{
optup = SearchSysCacheTuple(OPRNAME,
optup = SearchSysCacheTuple(OPERNAME,
PointerGetDatum("="),
ObjectIdGetDatum(datatype),
ObjectIdGetDatum(datatype),
@@ -1919,7 +1919,7 @@ prefix_quals(Var *leftop, Oid expr_op,
*
* We can always say "x >= prefix".
*/
optup = SearchSysCacheTuple(OPRNAME,
optup = SearchSysCacheTuple(OPERNAME,
PointerGetDatum(">="),
ObjectIdGetDatum(datatype),
ObjectIdGetDatum(datatype),
@@ -1947,7 +1947,7 @@ prefix_quals(Var *leftop, Oid expr_op,
prefix[prefixlen] = '\377';
prefix[prefixlen+1] = '\0';
optup = SearchSysCacheTuple(OPRNAME,
optup = SearchSysCacheTuple(OPERNAME,
PointerGetDatum("<="),
ObjectIdGetDatum(datatype),
ObjectIdGetDatum(datatype),

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.54 1999/10/07 04:23:08 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.55 1999/11/22 17:56:17 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -902,7 +902,7 @@ eval_const_expressions_mutator (Node *node, void *context)
result_typeid = func->functype;
}
/* Someday lsyscache.c might provide a function for this */
func_tuple = SearchSysCacheTuple(PROOID,
func_tuple = SearchSysCacheTuple(PROCOID,
ObjectIdGetDatum(funcid),
0, 0, 0);
if (!HeapTupleIsValid(func_tuple))

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.39 1999/11/21 23:25:47 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.40 1999/11/22 17:56:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -372,7 +372,7 @@ find_inheritance_children(Oid inhparent)
scan = heap_beginscan(relation, 0, SnapshotNow, 1, key);
while (HeapTupleIsValid(inheritsTuple = heap_getnext(scan, 0)))
{
inhrelid = ((Form_pg_inherits) GETSTRUCT(inheritsTuple))->inhrel;
inhrelid = ((Form_pg_inherits) GETSTRUCT(inheritsTuple))->inhrelid;
list = lappendi(list, inhrelid);
}
heap_endscan(scan);