Can't I create indexes on BOOL columns?

From: "Manuel Lemos" <mlemos(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Can't I create indexes on BOOL columns?
Date: 1999-12-13 16:28:21
Message-ID: 1020.16T1093T9884714mlemos@acm.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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' NOT NULL,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(at)acm(dot)org
--
E-mail: mlemos(at)acm(dot)org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gunther Schadow 1999-12-13 16:40:53 Re: [GENERAL] Large objects + JDBC
Previous Message Dirk Lutzebaeck 1999-12-13 15:29:57 vacuum analyze: Tuple is too big (corrupts DB?)