Re: jsonb and nested hstore
От
Alvaro Herrera
Тема
Re: jsonb and nested hstore
Дата
Msg-id
20140227010154.GK4759@eldon.alvh.no-ip.org
Ответ на
Re: jsonb and nested hstore (Andres Freund)
Список
Дерево обсуждения
jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Alvaro Herrera <alvherre@2ndquadrant.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb and nested hstore Alvaro Herrera <alvherre@2ndquadrant.com>
Re: jsonb and nested hstore Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Teodor Sigaev <teodor@sigaev.ru>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore "Erik Rijkers" <er@xs4all.nl>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Hannu Krosing <hannu@2ndQuadrant.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Hannu Krosing <hannu@2ndQuadrant.com>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Alvaro Herrera <alvherre@2ndquadrant.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Thom Brown <thom@linux.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Thom Brown <thom@linux.com>
Re: jsonb and nested hstore Peter Geoghegan <pg@heroku.com>
Re: jsonb and nested hstore Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Oleg Bartunov <obartunov@gmail.com>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Oleg Bartunov <obartunov@gmail.com>
Re: jsonb and nested hstore Gavin Flower <GavinFlower@archidevsys.co.nz>
Re: jsonb and nested hstore Peter Geoghegan <pg@heroku.com>
Re: jsonb and nested hstore Oleg Bartunov <obartunov@gmail.com>
Re: jsonb and nested hstore Peter Geoghegan <pg@heroku.com>
Re: jsonb and nested hstore Teodor Sigaev <teodor@sigaev.ru>
Re: jsonb and nested hstore Teodor Sigaev <teodor@sigaev.ru>
Re: jsonb and nested hstore Peter Geoghegan <pg@heroku.com>
Re: jsonb and nested hstore Oleg Bartunov <obartunov@gmail.com>
Re: jsonb and nested hstore Peter Geoghegan <pg@heroku.com>
Re: jsonb and nested hstore Peter Geoghegan <pg@heroku.com>
Re: jsonb and nested hstore Teodor Sigaev <teodor@sigaev.ru>
Re: jsonb and nested hstore Peter Geoghegan <pg@heroku.com>
Re: jsonb and nested hstore Teodor Sigaev <teodor@sigaev.ru>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Teodor Sigaev <teodor@sigaev.ru>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Teodor Sigaev <teodor@sigaev.ru>
Re: jsonb and nested hstore Peter Geoghegan <pg@heroku.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore "Erik Rijkers" <er@xs4all.nl>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Peter Geoghegan <pg@heroku.com>
Re: jsonb and nested hstore Alvaro Herrera <alvherre@2ndquadrant.com>
Re: jsonb and nested hstore Peter Geoghegan <pg@heroku.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Tomas Vondra <tv@fuzzy.cz>
Re: jsonb and nested hstore Oleg Bartunov <obartunov@gmail.com>
adt Makefile, was Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: adt Makefile, was Re: jsonb and nested hstore Tom Lane <tgl@sss.pgh.pa.us>
Re: adt Makefile, was Re: jsonb and nested hstore Alvaro Herrera <alvherre@2ndquadrant.com>
Re: adt Makefile, was Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: adt Makefile, was Re: jsonb and nested hstore Michael Paquier <michael.paquier@gmail.com>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andres Freund <andres@2ndquadrant.com>
Re: jsonb and nested hstore Heikki Linnakangas <hlinnakangas@vmware.com>
Re: jsonb and nested hstore - small docpatch "Erik Rijkers" <er@xs4all.nl>
Re: jsonb and nested hstore - small docpatch "Erik Rijkers" <er@xs4all.nl>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Oleg Bartunov <obartunov@gmail.com>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Peter Geoghegan <pg@heroku.com>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Hannu Krosing <hannu@2ndQuadrant.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Re: jsonb and nested hstore Andrew Dunstan <andrew@dunslane.net>
Re: jsonb and nested hstore Merlin Moncure <mmoncure@gmail.com>
Andres Freund wrote:
> On 2014-02-26 16:23:12 -0500, Andrew Dunstan 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.
>
> Yes, please disregard, I misread. I think I wanted actually to say that
> the test for arg should be arg != NULL, because we don't usually do
> pointer truth tests (which I personally find odd, but well).
Pointer validity tests seem to be mostly a matter of personal
preference. I know I sometimes use just "if (foo)" and other times "if
(foo != NULL)". Both idioms are used inconsistently all over the place.
We even have a PointerIsValid() macro.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления