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

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: (9.1) btree_gist support for searching on "not equals"
Дата
Msg-id 1274757918.3342.4.camel@jdavis
обсуждение исходный текст
Ответ на Re: (9.1) btree_gist support for searching on "not equals"  (Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>)
Ответы Re: (9.1) btree_gist support for searching on "not equals"  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Sat, 2010-05-22 at 01:02 +0300, Marko Tiikkaja wrote:
> 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));
> 

Yes, you're right. Also, neither of us accounted for NULLs, so I suppose
a NOT NULL is necessary as well.

I think the original case (same values only) is potentially useful
enough that we should support it.

Regards,Jeff Davis



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ExecutorCheckPerms() hook
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_upgrade docs