using index on comparison with bit-operation?

From: geek_1981(at)yahoo(dot)de (Michael Groth)
To: pgsql-hackers(at)postgresql(dot)org
Subject: using index on comparison with bit-operation?
Date: 2004-04-07 13:01:03
Message-ID: e78bf033.0404070501.573bc209@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi,

is it possible to use an index on the expression '(table_1.field &
table_2.field)::int > 0' ?

here's the whole query:

SELECT
COUNT(*)
FROM
users AS users
JOIN
search_profile AS search_profile ON
(search_profile.bin_matching_field_0 &
users.bin_matching_field_0)::int > 0
WHERE
users.id = 190



best regards

michael

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2004-04-07 13:39:15 Re: Socket communication for contrib
Previous Message Magnus Hagander 2004-04-07 11:26:19 Re: Small suggestion on build script