Re: [GENERAL] Determining if an hstore is empty

2013-02-13 Thread Sergey Konoplev
On Mon, Feb 11, 2013 at 11:36 AM, Wells Oliver wrote: > What's the canonical way of doing this? Various failed attempts include: Just compare an empty hstore with yours. [local]:5432 grayhemp@grayhemp=# select ''::hstore = ''::hstore, ''::hstore = '{a=>1}'::hstore; ?column? | ?column? -

[GENERAL] Determining if an hstore is empty

2013-02-11 Thread Wells Oliver
What's the canonical way of doing this? Various failed attempts include: select array_length(%%'a=>1'::hstore - 'a=>1'::hstore, 1) select array_length(%%('a=>1'::hstore - 'a=>1'::hstore), 1) select array_length(avals('a=>1'::hstore - 'a=>1'::hstore), 1); select array_length(akeys('a=>1'::hst