Re: btree_gin and ranges

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: btree_gin and ranges
Date: 2014-10-22 11:44:16
Message-ID: CABRT9RBLZUKmeUa1twyHZ5O0Jc5zuyv_GxLGH+048EF_1BOjAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

On Wed, Oct 22, 2014 at 1:55 PM, Teodor Sigaev <teodor(at)sigaev(dot)ru> wrote:
> With patch it's possible to rewrite query with ranges
> SELECT * FROM test_int4 WHERE i <@ '[-1, 1]'::int4range
> and GIN index will support this query with single scan from -1 to 1.

Shouldn't this be implemented in a more generic manner? An ordinary
btree index could very well support <@ queries too, but your patch
only adds this capability to btree-gin.

The documentation describes btree-gin as providing "GIN operator
classes that implement B-tree equivalent behavior", but now the
behavior diverges.

Regards,
Marti

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2014-10-22 11:52:37 speedup tidbitmap patch: cache page
Previous Message Александр Глухов 2014-10-22 11:31:15 ARMv5