Re: [HACKERS] Arrays broken on temp tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Arrays broken on temp tables
Дата
Msg-id 13629.942294596@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Arrays broken on temp tables  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] Arrays broken on temp tables  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] What is nameout() for?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Arrays broken on temp tables