Roberto Bertolusso <[EMAIL PROTECTED]> 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
I am testing Postgresql-7.0.3
I would like to have an index all in lowercase to speed up this select:
SELECT * FROM test WHERE lower(username) = 'max';
Please tell me what am I doing wrong:
In psql...
testdb=# CREATE TABLE test (username varchar(50));
CREATE
testdb=# CREATE UNIQUE INDEX test_ind