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-11 04:29:56
Message-ID: 13629.942294596@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:
>> There is more than one way we could attack this, but I think the
>> cleanest answer will be to make it possible to extract a logical
>> table name from a relcache entry.

> Well, as I remember, the good news is that our code was fine, and the
> original poster just missed the WHERE clause on the update. So I guess
> that gets us off the hook for a while.
> However, now looking at the posting again:
> http://www.postgresql.org/mhonarc/pgsql-hackers/1999-11/msg00213.html
> I am confused again.

No, our code is *not* OK. It's true that the original example was given
without a WHERE clause, whereas a practical UPDATE would usually have a
WHERE clause; but that has nothing to do with whether the planner will
generate a join or not. If a join is done then the wrong things will
happen, WHERE or no WHERE.

The bottom line here is that we mustn't generate separate RTEs for the
logical and physical table names.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-11-11 04:33:13 Re: [HACKERS] Arrays broken on temp tables
Previous Message Tom Lane 1999-11-11 03:13:28 Re: [HACKERS] What is nameout() for?