Re: Bug in error reporting for multi-line JSON
| От | Tom Lane |
|---|---|
| Тема | Re: Bug in error reporting for multi-line JSON |
| Дата | |
| Msg-id | 552305.1629903352@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Bug in error reporting for multi-line JSON (Daniel Gustafsson <daniel@yesql.se>) |
| Список | pgsql-bugs |
Daniel Gustafsson <daniel@yesql.se> writes:
>> On 25 Aug 2021, at 10:22, tanghy.fnst@fujitsu.com wrote:
>> I think the while condition "context_start < context_end" added in commit ffd3944ab9 is useless. Thoughts?
> Judging by the diff it’s likely a leftover from the previous coding. I don’t
> see a case for when it would hit, but it also doesn’t seem to do any harm apart
> from potentially causing static analyzers to get angry.
Yeah. I think that while reviewing this patch I read the while-condition
as a range check on context_start, but it isn't --- both inequalities
are in the same direction. I suppose there could be some quibble
about what happens if context_end - context_start is so large as to
overflow an integer, but that's never gonna happen (and if it did,
we'd have other issues, for instance the lack of any check-for-interrupt
in this loop).
Will fix.
regards, tom lane
В списке pgsql-bugs по дате отправления: