Re: (9.1) btree_gist support for searching on "not equals"
Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
From: Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
To: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-hackers@postgresql.org, Oleg Bartunov <oleg@sai.msu.su>, Teodor Sigaev <teodor@sigaev.ru>
Date: 2010-05-21T22:02:46Z
Lists: pgsql-hackers
On 5/21/10 11:47 PM +0300, Jeff Davis wrote: > It also allows you to enforce the constraint that only one tuple exists > in a table by doing something like: > > create table a > ( > i int, > exclude using gist (i with<>), > unique (i) > ); FWIW, this is achievable a lot more easily: CREATE UNIQUE INDEX "a_single_row" ON a ((1)); Regards, Marko Tiikkaja