repost: unique composite index with boolean fields

Поиск
Список
Период
Сортировка
От Dmitry Morozovsky
Тема repost: unique composite index with boolean fields
Дата
Msg-id Pine.BSF.4.05.9908102129300.15954-100000@woozle.rinet.ru
обсуждение исходный текст
Ответы Re: [GENERAL] repost: unique composite index with boolean fields  (Herouth Maoz <herouth@oumail.openu.ac.il>)
Список pgsql-general
Hello there,

Could anybody advise me how can I create composite index for table when
one of key fields is of boolean type?

Schema is as follows:

create table test (indoor bool, pos int, name varchar(64) NOT NULL,
check (pos >= 0 and pos <=32000));

create unique index test_pkey on test (indoor, pos);

leads to error
ERROR:  Can't find a default operator class for type 16.

Finally, I use char_ops as type class:

create unique index test_pkey on test (indoor char_ops, pos);

 -- is it correct?

Sincerely,
D.Marck                                   [DM5020, DM268-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------



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

Предыдущее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [GENERAL] Backend cache problem revisited
Следующее
От: Dmitry Morozovsky
Дата:
Сообщение: Re: [GENERAL] ALTER TABLE