Re: parse error in create index - Mailing list pgsql-sql

From Tom Lane
Subject Re: parse error in create index
Date
Msg-id 18588.981993244@sss.pgh.pa.us
Whole thread Raw
In response to Re: parse error in create index  (Hubert Palme <palme@uni-wuppertal.de>)
List pgsql-sql
Hubert Palme <palme@uni-wuppertal.de> writes:
> adressen=> CREATE INDEX xxx ON geburtstage (geb_monat(geburtstag));
> ERROR:  DefineIndex: (null) class not found
> adressen=>

Apparently you're using 6.5 or older ... I'd recommend updating!

IIRC, in <= 6.5 you *must* specify an operator class for a functional
index.  So,

CREATE INDEX xxx ON geburtstage (geb_monat(geburtstag) float8_ops);

(assuming that geb_monat returns a float8, else adjust to suit).

Don't have a 6.5 server running anymore to check this on, however.
        regards, tom lane


pgsql-sql by date:

Previous
From: Najm Hashmi
Date:
Subject: Wierd postgres Problem
Next
From: Tom Lane
Date:
Subject: Re: view does not show all records it should