Greg Stark <gsstark(at)mit(dot)edu> writes:
> On Tue, Oct 19, 2010 at 12:03 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> The trick is that it would require us to have two pg_class tables, two
>> pg_attribute tables, two pg_attrdef tables, etc.: in each case, one
>> permanent and one temporary. I am not sure how complex that will turn
>> out to be.
> Tom suggested using inheritance for this.
> I find it strange to try constructing catalog tables to represent
> these local definitions which never need to be read by any other
> backend and in any case are 1:1 copies of the global catalog entries.
> It seems to me simpler and more direct to just nail relcache
> entries for these objects into memory and manipulate them directly.
Relcache entries alone are not gonna work. There is way too much stuff
that assumes that tables are correctly represented in the system
It's possible that you could make it work if you created the child
catalogs and immediately filled them with suitable entries describing
the child catalogs themselves. Bootstrapping that might be a bit of fun
The larger issue in all this is that there's so much code that supposes
that it just has to scan a particular catalog when it wants an entry,
and isn't going to go looking for child tables of the catalog. That's
possibly fixable but is not likely to be easy, unless you can somehow
hide it within systable_beginscan and related routines.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2010-10-19 22:51:45|
|Subject: Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP) |
|Previous:||From: Kevin Grittner||Date: 2010-10-19 22:28:30|
|Subject: Re: Serializable snapshot isolation patch|