"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