Re: Document and/or remove unreachable code in tuptoaster.c from varvarlena patch

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Document and/or remove unreachable code in tuptoaster.c from varvarlena patch
Дата
Msg-id 87fy2xkhrr.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: Document and/or remove unreachable code in tuptoaster.c from varvarlena patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> Gregory Stark <stark@enterprisedb.com> writes:
>> Testers here were having a hard time constructing test cases to reach some
>> lines touched by the varvarlena patch. Upon further investigation I'm
>> convinced they're unreachable.
>
> I'm not really happy with any of this patch. ISTM that the stuff you say is
> unreachable is only so because of non-essential behavioral choices made in
> other parts of the code. If we were to change those other parts later, this
> code (after patching) would break. I'd rather leave complete coverage here
> and not make fragile assumptions; especially so since these are presumably
> not performance-critical paths.

Ok, that's true for the branches handling packed toast chunks. I thought it
was better to throw an error rather than have silently accept something which
indicates something unexpected has happened. And it was just extra useless
code for readers to slog through. 

The others I just put comments on In case the next person was as confused as I
was trying to figure out the logic. They're not especially performance
critical even though they're in the loop because they only get hit when we're
considering fields the first time.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Strange file in cvs repo
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: pg_lzcompress strategy parameters