Re: [bug fix??] Fishy code in tts_cirtual_copyslot()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [bug fix??] Fishy code in tts_cirtual_copyslot()
Дата
Msg-id 19783.1569176676@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [bug fix??] Fishy code in tts_cirtual_copyslot()  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Ответы RE: [bug fix??] Fishy code in tts_cirtual_copyslot()  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Re: [bug fix??] Fishy code in tts_cirtual_copyslot()  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
"Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com> writes:
> In the following code in execTuples.c, shouldn' srcdesc point to the source slot's tuple descriptor?  The attached
fixpasses make check.  What kind of failure could this cause? 

Yeah, sure looks like a typo to me too.

I temporarily changed the Assert to be "==" rather than "<=", and
it still passed check-world, so evidently we are not testing any
cases where the descriptors are of different lengths.  This explains
the lack of symptoms.  It's still a bug though, so pushed.

> BTW, I thought that in PostgreSQL coding convention, local variables should be defined at the top of blocks, but this
functionwrites "for (int natts;". 

Yeah, we've agreed to join the 21st century to the extent of allowing
local for-loop variables.

Thanks for the report!

            regards, tom lane



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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: JSONPATH documentation
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: JSONPATH documentation