Re: jsonb and nested hstore - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: jsonb and nested hstore
Date
Msg-id CAM3SWZSk4Bmg3GDF9PDhtj1ZcY8=fdLtquFuF7r0JafEKXF6ww@mail.gmail.com
Whole thread Raw
In response to Re: jsonb and nested hstore  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: jsonb and nested hstore  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Wed, Feb 26, 2014 at 1:23 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>>> +       if (va->string.len == vb->string.len)
>>> +       {
>>> +               res = memcmp(va->string.val, vb->string.val,
>>> va->string.len);
>>> +               if (res == 0 && arg)
>>> +                       *(bool *) arg = true;
>>
>> Should be NULL, not 0.
>
>
> No, the compiler doesn't like that for int values.

I'm confused. I just pulled from feodor/jsonb_and_hstore, and I do see
a compiler warning (because the code reads "res == NULL", unlike
above). It appears to have been that way in Git since last year. So,
maybe Andres meant that it *should* look like this?


-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: extension_control_path
Next
From: Alvaro Herrera
Date:
Subject: Re: Another possible corruption bug in 9.3.2 or possibly a known MultiXact problem?