diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-03-31 06:26:32 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-03-31 06:26:32 +0000 |
commit | 31141025214e9508be5cb05b87cd63e563960925 (patch) | |
tree | a11afc3f520cb986892e759159d026afc7c4140c /src/backend/utils/cache/syscache.c | |
parent | 5f4745adf4fb2a1f933b25d7a2bc72b39fa9edfd (diff) | |
download | postgresql-31141025214e9508be5cb05b87cd63e563960925.tar.gz postgresql-31141025214e9508be5cb05b87cd63e563960925.zip |
Reimplement temp tables using schemas. The temp table map is history;
temp table entries in pg_class have the names the user would expect.
Diffstat (limited to 'src/backend/utils/cache/syscache.c')
-rw-r--r-- | src/backend/utils/cache/syscache.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c index a160e4fb1bd..7f988782c75 100644 --- a/src/backend/utils/cache/syscache.c +++ b/src/backend/utils/cache/syscache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.71 2002/03/29 19:06:15 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.72 2002/03/31 06:26:32 tgl Exp $ * * NOTES * These routines allow the parser/planner/executor to perform @@ -42,7 +42,6 @@ #include "catalog/pg_type.h" #include "utils/catcache.h" #include "utils/syscache.h" -#include "utils/temprel.h" #include "miscadmin.h" @@ -500,29 +499,9 @@ SearchSysCache(int cacheId, Datum key3, Datum key4) { - if (cacheId < 0 || cacheId >= SysCacheSize) - { + if (cacheId < 0 || cacheId >= SysCacheSize || + ! PointerIsValid(SysCache[cacheId])) elog(ERROR, "SearchSysCache: Bad cache id %d", cacheId); - return (HeapTuple) NULL; - } - - Assert(PointerIsValid(SysCache[cacheId])); - - /* - * If someone tries to look up a relname, translate temp relation - * names to real names. Less obviously, apply the same translation to - * type names, so that the type tuple of a temp table will be found - * when sought. This is a kluge ... temp table substitution should be - * happening at a higher level ... - */ - if (cacheId == RELNAMENSP || cacheId == TYPENAMENSP) - { - char *nontemp_relname; - - nontemp_relname = get_temp_rel_by_username(DatumGetCString(key1)); - if (nontemp_relname != NULL) - key1 = CStringGetDatum(nontemp_relname); - } return SearchCatCache(SysCache[cacheId], key1, key2, key3, key4); } |