Re: jsonb and nested hstore

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: jsonb and nested hstore
Дата
Msg-id 5315ECDB.90803@sigaev.ru
обсуждение исходный текст
Ответ на Re: jsonb and nested hstore  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
> huh.  what it is the standard for equivalence?  I guess we'd be
> following javascript ===, right?
> (http://dorey.github.io/JavaScript-Equality-Table/).

right.

But in your link I don't understand array (and object) equality rules. Hstore 
(and jsonb) compare function believes that arrays are equal if each 
corresponding elements of them are equal.

postgres=# select 'a=>[]'::hstore = 'a=>[]'::hstore; ?column?
---------- t
(1 row)

Time: 0,576 ms
postgres=# select 'a=>[0]'::hstore = 'a=>[0]'::hstore; ?column?
---------- t
(1 row)

Time: 0,663 ms
postgres=# select 'a=>[0]'::hstore = 'a=>[1]'::hstore; ?column?
---------- f



-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: Securing "make check" (CVE-2014-0067)
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: GSoC proposal - "make an unlogged table logged"