1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-13 16:22:44 +03:00

Removed (useless) pg_proc_prosrc_index

Jan
This commit is contained in:
Jan Wieck
1999-09-30 10:31:47 +00:00
parent 2993f0c100
commit daaeafd9e1
5 changed files with 26 additions and 48 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.46 1999/09/29 16:05:56 wieck Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.47 1999/09/30 10:31:42 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,8 +42,7 @@ char *Name_pg_attr_indices[Num_pg_attr_indices] = {AttributeNameIndex,
AttributeNumIndex,
AttributeRelidIndex};
char *Name_pg_proc_indices[Num_pg_proc_indices] = {ProcedureNameIndex,
ProcedureOidIndex,
ProcedureSrcIndex};
ProcedureOidIndex};
char *Name_pg_type_indices[Num_pg_type_indices] = {TypeNameIndex,
TypeOidIndex};
char *Name_pg_class_indices[Num_pg_class_indices] = {ClassNameIndex,
@@ -378,28 +377,6 @@ ProcedureNameIndexScan(Relation heapRelation,
}
HeapTuple
ProcedureSrcIndexScan(Relation heapRelation, text *procSrc)
{
Relation idesc;
ScanKeyData skey[1];
HeapTuple tuple;
ScanKeyEntryInitialize(&skey[0],
(bits16) 0x0,
(AttrNumber) 1,
(RegProcedure) F_TEXTEQ,
PointerGetDatum(procSrc));
idesc = index_openr(ProcedureSrcIndex);
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
index_close(idesc);
return tuple;
}
HeapTuple
TypeOidIndexScan(Relation heapRelation, Oid typeId)
{

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.34 1999/09/18 19:06:34 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.35 1999/09/30 10:31:42 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -64,7 +64,6 @@ ProcedureCreate(char *procedureName,
Oid typev[8];
Oid relid;
Oid toid;
text *prosrctext;
NameData procname;
TupleDesc tupDesc;
@@ -131,6 +130,20 @@ ProcedureCreate(char *procedureName,
*/
if (!strcmp(procedureName, GENERICSETNAME))
{
#ifdef SETS_FIXED
/* ----------
* The code below doesn't work any more because the
* PROSRC system cache and the pg_proc_prosrc_index
* have been removed. Instead a sequential heap scan
* or something better must get implemented. The reason
* for removing is that nbtree index crashes if sources
* exceed 2K what's likely for procedural languages.
*
* 1999/09/30 Jan
* ----------
*/
text *prosrctext;
prosrctext = textin(prosrc);
tup = SearchSysCacheTuple(PROSRC,
PointerGetDatum(prosrctext),
@@ -138,6 +151,9 @@ ProcedureCreate(char *procedureName,
pfree(prosrctext);
if (HeapTupleIsValid(tup))
return tup->t_data->t_oid;
#else
elog(ERROR, "lookup for procedure by source needs fix (Jan)");
#endif /* SETS_FIXED */
}
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.36 1999/09/18 19:07:55 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.37 1999/09/30 10:31:43 wieck Exp $
*
* NOTES
* These routines allow the parser/planner/executor to perform
@@ -336,17 +336,6 @@ static struct cachedesc cacheinfo[] = {
offsetof(FormData_pg_rewrite, ev_qual),
NULL,
(ScanFunc) NULL},
{ProcedureRelationName, /* PROSRC */
1,
{
Anum_pg_proc_prosrc,
0,
0,
0
},
offsetof(FormData_pg_proc, prosrc),
ProcedureSrcIndex,
(ScanFunc) ProcedureSrcIndexScan},
{OperatorClassRelationName, /* CLADEFTYPE */
1,
{