SCHEMA idea

Started by Bruce Momjianalmost 25 years ago2 messageshackers
Jump to latest
#1Bruce Momjian
bruce@momjian.us

I know Tom has talked about doing schemas for 7.2. I have an idea.

I did temp tables by doing the temp table mapping as part of cache
lookups. Though this seems like a strange idea, the cache is the
central location for name/tuple lookups, and is a natural place for
other mappings, perhaps even SCHEMA.

Comments?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#1)
Re: SCHEMA idea

Bruce Momjian <pgman@candle.pha.pa.us> writes:

I know Tom has talked about doing schemas for 7.2. I have an idea.
I did temp tables by doing the temp table mapping as part of cache
lookups. Though this seems like a strange idea, the cache is the
central location for name/tuple lookups, and is a natural place for
other mappings, perhaps even SCHEMA.

Well, actually, I hope that one of the side effects of implementing
real schemas is that the current hack for temp tables goes away ;-)

The problem with the temp table mechanism is that its state is not
visible: you can't see the logical names of temp tables in pg_class,
you can't find out the mapping to real table names, etc. In a proper
schema implementation, all that stuff *will* be in system catalogs
where people can query it.

I'm hoping that temp tables will be reimplemented as a per-backend
schema that sits at the front of the search path for table names.
But I haven't looked yet to see what's involved in making that happen.

regards, tom lane