Re: (9.1) btree_gist support for searching on "not equals"

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: (9.1) btree_gist support for searching on "not equals"
Date: 2010-05-21 22:02:46
Message-ID: 4BF70306.6080309@cs.helsinki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2010-05-22 00:48:24 beta testing - planner bug - ERROR: XX000: failed to build any 2-way joins
Previous Message Josh Berkus 2010-05-21 21:57:35 Idea for getting rid of VACUUM FREEZE on cold pages