Re: Brain fade in gin_extract_jsonb_path() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Brain fade in gin_extract_jsonb_path()
Date
Msg-id 22335.1446765691@sss.pgh.pa.us
Whole thread Raw
In response to Re: Brain fade in gin_extract_jsonb_path()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> I think the easiest way to fix this is to forget about the special
> initialization at outer level and just always initialize a new stack level
> to have the same hash as its parent.  That leads to the first patch below
> --- but once you look at that, you realize that we've got unnecessarily
> many copies of stack->parent->hash into stack->hash, so what I actually
> propose now is the second patch below.

Meh, that wasn't quite right either --- need to reset stack->hash after
processing a sub-object, not only after a scalar VALUE.  I think what I
committed is OK though.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: NOTIFY in Background Worker
Next
From: Tomas Vondra
Date:
Subject: Re: GIN data corruption bug(s) in 9.6devel