Re: Cannot CREATE INDEX that contains a function - Mailing list pgsql-sql

From Tom Lane
Subject Re: Cannot CREATE INDEX that contains a function
Date
Msg-id 28424.980480843@sss.pgh.pa.us
Whole thread Raw
In response to Cannot CREATE INDEX that contains a function  (Roberto Bertolusso <rb@desinet-sa.com>)
List pgsql-sql
Roberto Bertolusso <rb@desinet-sa.com> writes:
> testdb=# CREATE TABLE test (username varchar(50));
> CREATE
> testdb=# CREATE UNIQUE INDEX test_index ON test (lower(username));
> ERROR: DefineIndex: function 'lower(varchar)' does not exist

Short answer in 7.0.* is to make the column be type text not varchar.
7.1 is more flexible about this ...
        regards, tom lane


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Rule not invoked in 7.1
Next
From: John Reid
Date:
Subject: Re: abstract data types?