Can't I create indexes on BOOL columns? - Mailing list pgsql-general

From Manuel Lemos
Subject Can't I create indexes on BOOL columns?
Date
Msg-id 1020.16T1093T9884714mlemos@acm.org
Whole thread Raw
Responses Re: [GENERAL] Can't I create indexes on BOOL columns?
List pgsql-general
Hello,

I am using PostgreSQL 6.4.2.  and it seems I can't create indexes on BOOL
columns.  I tried this:

$ psql template1
template1=> CREATE DATABASE test\g
CREATEDB
template1=> CREATE TABLE users (id INT DEFAULT 0 NOT NULL,name TEXT,preferred_name TEXT,email TEXT,alias VARCHAR (12)
DEFAULT'0' NOT NULL,password TEXT,reminder TEXT,notify_any CHAR (1) DEFAULT 't' NOT NULL,notify_new CHAR(1) DEFAULT 't'
NOTNULL,notify_changed CHAR(1) DEFAULT 't',edit_users CHAR(1) DEFAULT 'f')\g 
CREATE
template1=> CREATE INDEX users_notify ON users (notify_any,notify_new)\g
ERROR:  Can't find a default operator class for type 16

However, if I change the BOOL type to CHAR (1) it works.

Is this a bug? A configuration problem? What?

Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--


pgsql-general by date:

Previous
From: Ed Loehr
Date:
Subject: [GENERAL/INTERFACES] Dynamically detecting need to vacuum?
Next
From: Robert
Date:
Subject: With what options RPM was compiled? ( Was: Czech Win1250 sorting q)