Re: hstore ?& operator versus mathematics

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: hstore ?& operator versus mathematics
Date: 2011-01-10 05:19:02
Message-ID: 20110110051902.GA13020@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 09, 2011 at 04:10:25PM -0500, Tom Lane wrote:
> hstore's "hstore ?& text[]" operator is defined as "contains all", ie,
> it will return true if all the key names found in the text array are
> present in the hstore.
>
> ISTM that a sane definition of this operator would provide that if the
> array is empty, it returns true: every set contains the empty set.
> However, the code goes out of its way to return false instead.
>
> Perhaps this was done intentionally because there was no way to make
> GIN index searches work compatibly ... but now there is, so I see no
> reason to remain bug-compatible with this behavior.
>
> Barring objections, I'm going to fix it.

+1 for fixing it.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2011-01-10 08:25:23 Re: pgbench to the MAXINT
Previous Message Euler Taveira de Oliveira 2011-01-10 05:17:14 Re: pgbench to the MAXINT