Bruno Wolff III <bruno@wolff.to> writes:
>> It says here (cube.sql.in) that the @ operator *is* cube_contains.
> A short example is:
> cube=> explain select col1 from c where cube_contains('(-78,39),(-77,40)',col1);NOTICE: QUERY PLAN:
> Seq Scan on c (cost=0.00..369.30 rows=6195 width=24)
> EXPLAIN
> cube=> explain select col1 from c where '(-78,39),(-77,40)' @ col1;
> NOTICE: QUERY PLAN:
> Index Scan using c_index on c (cost=0.00..71.87 rows=19 width=24)
Well, yeah. Indexes work with operators, not with functions. This is
a consequence of decisions taken a decade ago at Berkeley: the system
catalogs that show what indexes can do connect *operators* to indexes,
not functions to indexes. Use the operator.
regards, tom lane