Hi, hackers!
Here's a small patch that implements fetch function necessary for
Index Only Scans that use cube data type.
I reuse function g_cube_decompress() instead of creating new function
g_cube_fetch().
Essentially, they both have to detoast data.
How do you think, is it better to create a shallow copy of
g_cube_decompress instead?
Any other suggestions on the functionality?
This
CREATE TABLE SOMECUBES AS SELECT CUBE(X,X+1) C FROM GENERATE_SERIES(1,100) X;
CREATE INDEX SOMECUBES_IDX ON SOMECUBES USING GIST(C);
SET ENABLE_SEQSCAN = FALSE;
EXPLAIN (COSTS OFF ) SELECT C FROM SOMECUBES WHERE C<@CUBE(30,40);
now produces
Index Only Scan using somecubes_idx on somecubes
Index Cond: (c <@ '(30),(40)'::cube)
instead of
Index Scan using somecubes_idx on somecubes
Index Cond: (c <@ '(30),(40)'::cube)
Best regards, Andrey Borodin, Octonica.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers