EXCLUDE [ USING index_method ] ( exclude_element WITH operator [, ... ] ) index_parameters [ WHERE ( predicate ) ]
[...]
Although it's allowed, there is little point in using B-tree or hash indexes with an exclusion constraint, because this does nothing that an ordinary unique constraint doesn't do better. So in practice the access method will always be GiST or SP-GiST.
Would seem particularly attractive for values too large for btree indexes. An index on a hash value is the recommended workaround, but an exclusion constraint also handles hash collisions automatically. (Or even for any wide column to keep index size low.)
Hence my questions:
- Why does an exclusion constraint with "USING hash(i WITH =)" enforce uniqueness, while we still can't create a "UNIQUE index ... USING hash .."?
- Why would the manual discourage its use? Should I file a documentation bug?