Stan Bielski <[EMAIL PROTECTED]> writes:
> On Thu, 29 Jul 2004, Tom Lane wrote:
>> Are you sure the join condition is hashjoinable?  You didn't say
>> anything about the datatypes involved ...

> My apologies. The columns that I want to join are both type 'inet'.
> Shouldn't that be hashjoinable? 

Depends on your PG version.  The raw type isn't hashjoinable, because
its '=' operator ignores the inet-vs-cidr flag.  Before 7.4 the operator
was (correctly) marked not hashjoinable.  In 7.4 it was (incorrectly)
marked hashjoinable, due no doubt to momentary brain fade on my part.
For 7.5 it is hashjoinable and the join will actually work, because we
added a specialized hash function that also ignores the inet-vs-cidr flag.

If you are joining data that is all inet or all cidr (no mixtures),
then 7.4 works okay, which is why we didn't notice the bug right away.
If that's good enough for now, you could emulate the 7.4 behavior in
earlier releases by setting the oprcanhash flag in pg_operator for the
inet equality operator.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to