Re: WIP Incremental JSON Parser
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Nathan Bossart <nathandbossart@gmail.com>,
Jelte Fennema-Nio <postgres@jeltef.nl>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Amit Langote <amitlangote09@gmail.com>,
Jacob Champion <jacob.champion@enterprisedb.com>,
Robert Haas <robertmhaas@gmail.com>, Peter Smith <smithpb2250@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-04-04T19:31:12Z
Lists: pgsql-hackers
Attachments
- fix_lex_number.patch (text/x-patch) patch
On 2024-04-04 Th 14:06, Nathan Bossart wrote: > Apologies for piling on, but my compiler (gcc 9.4.0) is unhappy: > > ../postgresql/src/common/jsonapi.c: In function ‘IsValidJsonNumber’: > ../postgresql/src/common/jsonapi.c:2016:30: error: ‘dummy_lex.inc_state’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > 2016 | if (lex->incremental && !lex->inc_state->is_last_chunk && > | ~~~^~~~~~~~~~~ > ../postgresql/src/common/jsonapi.c:2020:36: error: ‘dummy_lex.token_start’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > 2020 | lex->token_start, s - lex->token_start); > | ~~~^~~~~~~~~~~~~ > ../postgresql/src/common/jsonapi.c:302:26: error: ‘numeric_error’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > 302 | return (!numeric_error) && (total_len == dummy_lex.input_length); > | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Please pile on. I want to get this fixed. It seems odd that my much later gcc didn't complain. Does the attached patch fix it for you? cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
Commits
-
Post review fixes for test_json_parser test module
- ba3e6e2bca97 17.0 landed
-
Shrink test file for test_json_parser module
- b8a7bfa33324 17.0 landed
-
Add support for incrementally parsing backup manifests
- ea7b4e9a2a7c 17.0 landed
-
Introduce a non-recursive JSON parser
- 3311ea86edc7 17.0 landed
-
Use incremental parsing of backup manifests.
- 222e11a10ae9 17.0 landed