A blog which tries to demystify computer security, point out the half-truths and misinformation which floats around about this subject and hopefully reduce the hype created by semi-informed people. It also has some useful tips from time to time.

First time here? I hope that you find something interesting and useful. Check out the most popular pages or the categories I most frequently post in:

Thursday, June 05, 2008

While working with some GIN indexes (to speed up the && and <@ / @> operators) I was very surprised to see that after the installation of the intarray (_int) contrib module the query planner stopped using the index. After some poking around it came to me:

The contrib module is defining its own operators for the arrays, operators which are different from the ones used by GIN to build the indexes. My quick and dirty solution is to drop the functions which implement those operators with cascade, which results in the operators themselves being dropped also:

This drops the functions which implement the aforementioned three operators. And now everything works again. A word of caution: probably there are less destructive methods to resolve this problem (possibly recreating the index with an other operator class or something like that), however this worked for me.