Re: Hashable custom types - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Hashable custom types
Date
Msg-id CAM-w4HOyQ9C4+aW24JAmfohxXx0hoGJFHN9Bc=633XYxmcp+OA@mail.gmail.com
Whole thread Raw
In response to Re: Hashable custom types  (Atri Sharma <atri.jiit@gmail.com>)
Responses Re: Hashable custom types  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Apr 26, 2014 at 6:39 PM, Atri Sharma <atri.jiit@gmail.com> wrote:
> Without sorting, isnt the scope of a recursive UNION with custom datatypes
> pretty restrictive?

All the default data types are hashable. It's not hard to add a hash
operator class. In a clean slate design it would probably have been
simpler to just make it a requirement that any data type provide a
default hash operator (and probably a default btree comparator).
Postgres provides a lot of degrees of freedom but it should probably
be considered best practice to just provide both even if you don't
envision one or the other being used directly by users for indexes.


-- 
greg



pgsql-hackers by date:

Previous
From: Alfred Perlstein
Date:
Subject: Re: Perfomance degradation 9.3 (vs 9.2) for FreeBSD
Next
From: Stephen Frost
Date:
Subject: Re: Perfomance degradation 9.3 (vs 9.2) for FreeBSD