'Postgres index type for array column for ANY queries

I have a Postgres table with a column that's an array of strings. The only searches that will be done using this column will be either IS NULL / IS NOT NULL and queries asking for rows where the array contains some value (e.g., 'vote'=ANY(T.column)).

Now, I know that a GIN index supports the <@ operator which checks if the elements of one array are included in the other (of which ANY is really the special case of a 1 element array). However, the answer to this question seems to suggest that ANY works fine with B-tree indexes as does Shana K's answer from this question (well actually she suggests <@ works with them).

However, the Postgres docs seem to only mention <, =, <= etc. as supported by B-tree. What index do I need to support a query searching for rows where an array column contains a specified value?

EDIT: Since posting both of those answers have now been updated to no longer suggest that a B-tree index will work.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source