Re: query returns incorrect results.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: query returns incorrect results.
Дата
Msg-id 17887.970793179@sss.pgh.pa.us
обсуждение исходный текст
Ответ на query returns incorrect results.  (Brian Hirt <bhirt@mobygames.com>)
Список pgsql-hackers
Brian Hirt <bhirt@mobygames.com> writes:
> I've run into a really strange problem that's taken a while for 
> me to track down, but I think I have enough information here
> for people to verify what I'm saying and hopefully enough information
> to point someone in the right direction for fixing.

Nasty.  Looks like the problem is that Materialize isn't paying
attention to chgParam (boo hiss), so when the subplan is re-executed
with successive g.id values, it keeps handing back the same rows
it computed on the first time through.  You only see a failure if
one of the subplans under the Materialize pays attention to g.id
(else the result *should* be the same each time), which is why the
failure comes and goes with different plans. 

This actually works correctly in current sources, because I had
rewritten nodeMaterial awhile back and put in the same ReScan
logic that I saw in other plan node types --- I just did that on
general principles, not thinking that it was a live bug fix.
So it hadn't occurred to me to try to back-patch that change,
but clearly we need to do something about it for 7.0.3.

I'll see what I can do about it...
        regards, tom lane


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

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: Re: ALTER TABLE DROP COLUMN
Следующее
От: Tom Lane
Дата:
Сообщение: Re: query returns incorrect results.