diff options
| author | Bruce Momjian | 1999-11-22 17:56:41 +0000 |
|---|---|---|
| committer | Bruce Momjian | 1999-11-22 17:56:41 +0000 |
| commit | fc955b14ea667e04475e2b7339c8445611470771 (patch) | |
| tree | 5f5a3760e1e5cdfe910125817d9217b837eab23b /src/pl | |
| parent | e30c2d67ef1c58d148bdc1b3a7faeed7b17d8b28 (diff) | |
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.
Diffstat (limited to 'src/pl')
| -rw-r--r-- | src/pl/plpgsql/src/pl_comp.c | 18 | ||||
| -rw-r--r-- | src/pl/plpgsql/src/pl_exec.c | 8 | ||||
| -rw-r--r-- | src/pl/tcl/pltcl.c | 18 |
3 files changed, 22 insertions, 22 deletions
diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c index 49bc642f4f4..6f908b48d28 100644 --- a/src/pl/plpgsql/src/pl_comp.c +++ b/src/pl/plpgsql/src/pl_comp.c @@ -3,7 +3,7 @@ * procedural language * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.12 1999/11/07 23:08:34 momjian Exp $ + * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.13 1999/11/22 17:56:39 momjian Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -132,7 +132,7 @@ plpgsql_compile(Oid fn_oid, int functype) * Lookup the pg_proc tuple by Oid * ---------- */ - procTup = SearchSysCacheTuple(PROOID, + procTup = SearchSysCacheTuple(PROCOID, ObjectIdGetDatum(fn_oid), 0, 0, 0); if (!HeapTupleIsValid(procTup)) @@ -174,7 +174,7 @@ plpgsql_compile(Oid fn_oid, int functype) * Lookup the functions return type * ---------- */ - typeTup = SearchSysCacheTuple(TYPOID, + typeTup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(procStruct->prorettype), 0, 0, 0); if (!HeapTupleIsValid(typeTup)) @@ -205,7 +205,7 @@ plpgsql_compile(Oid fn_oid, int functype) * Get the parameters type * ---------- */ - typeTup = SearchSysCacheTuple(TYPOID, + typeTup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(procStruct->proargtypes[i]), 0, 0, 0); if (!HeapTupleIsValid(typeTup)) @@ -601,7 +601,7 @@ plpgsql_parse_word(char *word) * ---------- */ typeXlated = xlateSqlType(cp); - typeTup = SearchSysCacheTuple(TYPNAME, + typeTup = SearchSysCacheTuple(TYPENAME, PointerGetDatum(typeXlated), 0, 0, 0); if (HeapTupleIsValid(typeTup)) { @@ -924,7 +924,7 @@ plpgsql_parse_wordtype(char *word) * ---------- */ typeXlated = xlateSqlType(cp); - typeTup = SearchSysCacheTuple(TYPNAME, + typeTup = SearchSysCacheTuple(TYPENAME, PointerGetDatum(typeXlated), 0, 0, 0); if (HeapTupleIsValid(typeTup)) { @@ -1067,7 +1067,7 @@ plpgsql_parse_dblwordtype(char *string) } attrStruct = (Form_pg_attribute) GETSTRUCT(attrtup); - typetup = SearchSysCacheTuple(TYPOID, + typetup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(attrStruct->atttypid), 0, 0, 0); if (!HeapTupleIsValid(typetup)) { @@ -1143,7 +1143,7 @@ plpgsql_parse_wordrowtype(char *string) * Fetch the tables pg_type tuple too * ---------- */ - typetup = SearchSysCacheTuple(TYPNAME, + typetup = SearchSysCacheTuple(TYPENAME, PointerGetDatum(word1), 0, 0, 0); if (!HeapTupleIsValid(typetup)) { @@ -1182,7 +1182,7 @@ plpgsql_parse_wordrowtype(char *string) } attrStruct = (Form_pg_attribute) GETSTRUCT(attrtup); - typetup = SearchSysCacheTuple(TYPOID, + typetup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(attrStruct->atttypid), 0, 0, 0); if (!HeapTupleIsValid(typetup)) { diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index 59485f84a22..2c37943eb48 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -3,7 +3,7 @@ * procedural language * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.14 1999/11/07 23:08:35 momjian Exp $ + * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.15 1999/11/22 17:56:40 momjian Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -1553,7 +1553,7 @@ exec_stmt_raise(PLpgSQL_execstate * estate, PLpgSQL_stmt_raise * stmt) extval = "<NULL>"; else { - typetup = SearchSysCacheTuple(TYPOID, + typetup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(var->datatype->typoid), 0, 0, 0); if (!HeapTupleIsValid(typetup)) elog(ERROR, "cache lookup for type %u failed (1)", var->datatype->typoid); @@ -1958,7 +1958,7 @@ exec_assign_value(PLpgSQL_execstate * estate, */ atttype = SPI_gettypeid(rec->tupdesc, i + 1); atttypmod = rec->tupdesc->attrs[i]->atttypmod; - typetup = SearchSysCacheTuple(TYPOID, + typetup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(atttype), 0, 0, 0); if (!HeapTupleIsValid(typetup)) elog(ERROR, "cache lookup for type %u failed", atttype); @@ -2389,7 +2389,7 @@ exec_cast_value(Datum value, Oid valtype, FmgrInfo finfo_output; char *extval; - typetup = SearchSysCacheTuple(TYPOID, + typetup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(valtype), 0, 0, 0); if (!HeapTupleIsValid(typetup)) elog(ERROR, "cache lookup for type %u failed", valtype); diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index 8813dc38811..ea9a956e548 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -3,7 +3,7 @@ * procedural language (PL) * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.14 1999/11/07 23:08:36 momjian Exp $ + * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.15 1999/11/22 17:56:41 momjian Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -467,7 +467,7 @@ pltcl_func_handler(FmgrInfo *proinfo, /************************************************************ * Lookup the pg_proc tuple by Oid ************************************************************/ - procTup = SearchSysCacheTuple(PROOID, + procTup = SearchSysCacheTuple(PROCOID, ObjectIdGetDatum(proinfo->fn_oid), 0, 0, 0); if (!HeapTupleIsValid(procTup)) @@ -482,7 +482,7 @@ pltcl_func_handler(FmgrInfo *proinfo, * Get the required information for input conversion of the * return value. ************************************************************/ - typeTup = SearchSysCacheTuple(TYPOID, + typeTup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(procStruct->prorettype), 0, 0, 0); if (!HeapTupleIsValid(typeTup)) @@ -512,7 +512,7 @@ pltcl_func_handler(FmgrInfo *proinfo, proc_internal_args[0] = '\0'; for (i = 0; i < proinfo->fn_nargs; i++) { - typeTup = SearchSysCacheTuple(TYPOID, + typeTup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(procStruct->proargtypes[i]), 0, 0, 0); if (!HeapTupleIsValid(typeTup)) @@ -798,7 +798,7 @@ pltcl_trigger_handler(FmgrInfo *proinfo) /************************************************************ * Lookup the pg_proc tuple by Oid ************************************************************/ - procTup = SearchSysCacheTuple(PROOID, + procTup = SearchSysCacheTuple(PROCOID, ObjectIdGetDatum(proinfo->fn_oid), 0, 0, 0); if (!HeapTupleIsValid(procTup)) @@ -1120,7 +1120,7 @@ pltcl_trigger_handler(FmgrInfo *proinfo) * Lookup the attribute type in the syscache * for the input function ************************************************************/ - typeTup = SearchSysCacheTuple(TYPOID, + typeTup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(tupdesc->attrs[attnum - 1]->atttypid), 0, 0, 0); if (!HeapTupleIsValid(typeTup)) @@ -1592,7 +1592,7 @@ pltcl_SPI_prepare(ClientData cdata, Tcl_Interp *interp, ************************************************************/ for (i = 0; i < nargs; i++) { - typeTup = SearchSysCacheTuple(TYPNAME, + typeTup = SearchSysCacheTuple(TYPENAME, PointerGetDatum(args[i]), 0, 0, 0); if (!HeapTupleIsValid(typeTup)) @@ -2137,7 +2137,7 @@ pltcl_set_tuple_values(Tcl_Interp *interp, char *arrayname, * Lookup the attribute type in the syscache * for the output function ************************************************************/ - typeTup = SearchSysCacheTuple(TYPOID, + typeTup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(tupdesc->attrs[i]->atttypid), 0, 0, 0); if (!HeapTupleIsValid(typeTup)) @@ -2210,7 +2210,7 @@ pltcl_build_tuple_argument(HeapTuple tuple, TupleDesc tupdesc, * Lookup the attribute type in the syscache * for the output function ************************************************************/ - typeTup = SearchSysCacheTuple(TYPOID, + typeTup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(tupdesc->attrs[i]->atttypid), 0, 0, 0); if (!HeapTupleIsValid(typeTup)) |
