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