Re: Bug in error reporting for multi-line JSON
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
Hamid Akhtar <hamid.akhtar@gmail.com>,
Simon Riggs <simon.riggs@enterprisedb.com>,
"pgsql-bugs@postgresql.org" <pgsql-bugs@postgresql.org>
Date: 2021-08-25T08:56:31Z
Lists: pgsql-bugs, pgsql-hackers
> On 25 Aug 2021, at 10:22, tanghy.fnst@fujitsu.com wrote: > > On Tuesday, March 2, 2021 6:50 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Daniel Gustafsson <daniel@yesql.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/
Commits
-
Remove redundant test.
- ed740b06b18e 14.0 landed
- 373e08a9f771 15.0 landed
-
Improve reporting for syntax errors in multi-line JSON data.
- ffd3944ab9d4 14.0 landed