Re: [HACKERS] Arrays broken on temp tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: Kristofer Munn <kmunn(at)munn(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Arrays broken on temp tables
Date: 1999-11-06 22:33:49
Message-ID: 3271.941927629@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> writes:
> Well, I now wonder whether I did the right thing in adding temp tables
> the way I did. Is there a better way.

I don't think there's anything wrong with the basic temp table design.
We've just discovered an oversight: given a Relation entry, there's no
way to get back the original table name, and sometimes you need to.

I'm inclined to think that RelationGetRelationName should be replaced
by two access macros: one to give back the "physical" rel name (same
as the current macro) and one to give back the "logical" name, which'd
be different in the case of a temp table. We'd need to extend relcache
entries to include the logical name as an additional field. Then we'd
need to look at all the uses of RelationGetRelationName to see which
ones should be which. There might be some direct accesses to
rel->rd_rel->relname as well :-( which need to be found and fixed.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Keith Parks 1999-11-06 23:01:06 Re: [HACKERS] New psql compile problem.
Previous Message Ryan Kirkpatrick 1999-11-06 22:18:55 Re: [HACKERS] PostgreSQL 6.5.3 built, but not released ...