Re: btree_gin and ranges - Mailing list pgsql-hackers

From Marti Raudsepp
Subject Re: btree_gin and ranges
Date
Msg-id CABRT9RBLZUKmeUa1twyHZ5O0Jc5zuyv_GxLGH+048EF_1BOjAg@mail.gmail.com
Whole thread Raw
In response to btree_gin and ranges  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: btree_gin and ranges
List pgsql-hackers
Hi

On Wed, Oct 22, 2014 at 1:55 PM, Teodor Sigaev <teodor@sigaev.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



pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: btree_gin and ranges
Next
From: Teodor Sigaev
Date:
Subject: speedup tidbitmap patch: cache page