Re: EXLCUDE constraints and Hash indexes - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: EXLCUDE constraints and Hash indexes
Date
Msg-id 87inuzk0bp.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to EXLCUDE constraints and Hash indexes  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: EXLCUDE constraints and Hash indexes  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
>>>>> "Jeff" == Jeff Janes <jeff.janes@gmail.com> writes:
Jeff> From: https://www.postgresql.org/docs/9.4/static/sql-createtable.html
Jeff> "The access method must support amgettuple (see Chapter 55); atJeff> present this means GIN cannot be used.
Althoughit's allowed, there isJeff> little point in using B-tree or hash indexes with an exclusionJeff> constraint,
becausethis does nothing that an ordinary uniqueJeff> constraint doesn't do better. So in practice the access method
willJeff>always be GiST or SP-GiST."
 

I also recently found a case where using btree exclusion constraints was
useful: a unique index on an expression can't be marked deferrable, but
the equivalent exclusion constraint can be.

-- 
Andrew (irc:RhodiumToad)



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Surprising behaviour of \set AUTOCOMMIT ON
Next
From: Stephen Frost
Date:
Subject: Re: patch proposal