unique composite index with boolean fields

From: Dmitry Morozovsky <marck(at)rinet(dot)ru>
To: pgsql-general(at)postgreSQL(dot)org
Subject: unique composite index with boolean fields
Date: 1999-08-06 14:47:30
Message-ID: Pine.BSF.4.05.9908061829310.11043-100000@woozle.rinet.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

I use char_ops as type class -- is it correct?

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

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 1999-08-06 14:57:16 Re: [GENERAL] What is R_PLANS?
Previous Message Ross J. Reedstrom 1999-08-06 14:15:17 Re: [GENERAL] table does not exist