Re: Hashable custom types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Paul Ramsey <pramsey(at)cleverelephant(dot)ca>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Geoghegan <pg(at)heroku(dot)com>
Subject: Re: Hashable custom types
Date: 2015-07-08 20:36:48
Message-ID: 13261.1436387808@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Paul Ramsey <pramsey(at)cleverelephant(dot)ca> writes:
>> UNION will preferentially glom onto the btree equality operator, if memory
>> serves. If that isn't also the hash equality operator, things won't work
>> pleasantly.

> So what does that mean for types that have both btree and hash equality operators? Dont all the built-ins also have this problem?

What I'm asking is why it would possibly be sensible to have different
notions of equality for hash and btree. In every existing type that has
both btree and hash opclasses, the equality members of those opclasses
are *the same operator*. You don't really want UNION giving different
answers depending on which implementation the planner happens to pick,
do you?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Paul Ramsey 2015-07-08 20:51:20 Re: Hashable custom types
Previous Message Paul Ramsey 2015-07-08 20:33:50 Re: Hashable custom types