I have a table with an array column.
I added a GIN index to the array:

CREATE INDEX foo_idx ON t USING GIN (alternatecodes) WHERE
alternatecodes IS NOT NULL;

That's all well and good.
However, some queries started failing and I was able to reproduce the
behavior in psql!

SELECT * FROM t WHERE alternatecodes IS NOT NULL;
returns:
ERROR:  GIN indexes do not support whole-index scans

Whaaa?  Adding an *index* makes my /queries/ stop working? How can this be?
This really violated my principle of least surprise. If GIN indexes
don't support whole-index scans, fine, don't use them, but don't make
a perfectly valid query fail because of it.

This seems like a bug. Is it?

PostgreSQL version:

 PostgreSQL 8.4.5 on x86_64-redhat-linux-gnu, compiled by GCC gcc
(GCC) 4.1.2 20080704 (Red Hat 4.1.2-48), 64-bit


-- 
Jon

-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

Reply via email to