Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group