Re: [HACKERS] puzzling JSON bug

2013-04-04 Thread Andrew Dunstan
On 04/04/2013 03:39 PM, Tom Lane wrote: Andrew Dunstan writes: David Wheeler has presented me with a nasty bug case. If I do this: select '{"members": { "add": [3, 4]}}'::json #> '{members,add}'; then I get a crash. If I comment out the pfree() at json.c:parse_object_field() lines 378-9 t

Re: [HACKERS] puzzling JSON bug

2013-04-04 Thread Tom Lane
Andrew Dunstan writes: > David Wheeler has presented me with a nasty bug case. > If I do this: > select '{"members": { "add": [3, 4]}}'::json #> '{members,add}'; > then I get a crash. > If I comment out the pfree() at json.c:parse_object_field() lines 378-9 > then I get back the right resu

[HACKERS] puzzling JSON bug

2013-04-04 Thread Andrew Dunstan
David Wheeler has presented me with a nasty bug case. If I do this: select '{"members": { "add": [3, 4]}}'::json #> '{members,add}'; then I get a crash. If I comment out the pfree() at json.c:parse_object_field() lines 378-9 then I get back the right result but instead get a warning like t