Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [206.210.65.6]) by hub.org (8.9.2/8.9.1) with ESMTP id MAA05329 for ; Sat, 6 Feb 1999 12:28:58 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id MAA20088; Sat, 6 Feb 1999 12:27:48 -0500 (EST) To: "Bryan White" cc: pgsql-sql@hub.org, pgsql-hackers@postgreSQL.org Subject: Re: [SQL] Functional Indexes In-reply-to: Your message of Fri, 5 Feb 1999 23:00:27 -0500 (EST) <199902060400.XAA31039@hub.org> Date: Sat, 06 Feb 1999 12:27:47 -0500 Message-ID: <20086.918322067@sss.pgh.pa.us> From: Tom Lane "Bryan White" writes: > The documentation for CREATE INDEX implies that functions are allowed in > index definitions but when I execute: > create unique index idxtest on customer (lower(email)); > the result is: > ERROR: DefineIndex: (null) class not found > Should this work? Do I have the syntax wrong? I tried this wih 6.4.2 and found that it was only accepted if I explicitly identified which index operator class to use: play=> create table customer (email text); CREATE play=> create unique index idxtest on customer (lower(email)); ERROR: DefineIndex: class not found play=> create unique index idxtest on customer (lower(email) text_ops); CREATE play=> That'll do as a workaround for Bryan, but isn't this a bug? Surely the system ought to know what type the result of lower() is... regards, tom lane