Re: Overlap function for hstore?

From: Paul Jungwirth <pj(at)illuminatedcomputing(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Overlap function for hstore?
Date: 2015-04-04 01:02:39
Message-ID: 551F382F.6090703@illuminatedcomputing.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> This underfits:
>
> postgres=# select hstore_to_array('a=>1,b=>2,c=>3'::hstore) &&
> hstore_to_array('a=>2,d=>4,b=>2'::hstore)
>
> ...because array overlaps op takes every element (even 'a' or 2 alone)
> and doesn't test for key and value together like in 'b=>2'!

How about hstore_to_matrix? Then you have a tuple for each key/value pair.

Paul

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2015-04-04 01:16:14 Re: Overlap function for hstore?
Previous Message Chris Curvey 2015-04-04 00:57:41 "could not split GIN page; no new items fit"