Re: Bug in error reporting for multi-line JSON

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hamid Akhtar <hamid(dot)akhtar(at)gmail(dot)com>, Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Bug in error reporting for multi-line JSON
Date: 2021-08-25 08:56:31
Message-ID: A999DFE1-BD97-4E93-9EBF-55B386974C90@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

> On 25 Aug 2021, at 10:22, tanghy(dot)fnst(at)fujitsu(dot)com wrote:
>
> On Tuesday, March 2, 2021 6:50 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
>>> I'm changing the status of this patch to Ready for Committer.
>>
>> I reviewed this and pushed it, with some changes.
>
> I think the while condition "context_start < context_end" added in commit ffd3944ab9 is useless. Thoughts?
>
> code added in ffd3944ab9
> + while (context_end - context_start >= 50 && context_start < context_end)

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.

--
Daniel Gustafsson https://vmware.com/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Neil Chen 2021-08-25 09:11:10 Re: BUG #17157: authorizaiton of dict_int and bloom extention
Previous Message tanghy.fnst@fujitsu.com 2021-08-25 08:22:57 RE: Bug in error reporting for multi-line JSON

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Nancarrow 2021-08-25 09:36:54 Re: Parallel scan with SubTransGetTopmostTransaction assert coredump
Previous Message Amit Kapila 2021-08-25 08:31:37 Re: row filtering for logical replication