From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: jsonb and nested hstore |
Date: | 2014-02-26 21:59:24 |
Message-ID: | CAM3SWZSk4Bmg3GDF9PDhtj1ZcY8=fdLtquFuF7r0JafEKXF6ww@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Feb 26, 2014 at 1:23 PM, Andrew Dunstan <andrew(at)dunslane(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2014-02-26 22:03:42 | Re: Another possible corruption bug in 9.3.2 or possibly a known MultiXact problem? |
Previous Message | Dimitri Fontaine | 2014-02-26 21:51:14 | Re: extension_control_path |