Re: Cannot CREATE INDEX that contains a function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Roberto Bertolusso <rb(at)desinet-sa(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Cannot CREATE INDEX that contains a function
Date: 2001-01-26 03:47:23
Message-ID: 28424.980480843@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice pgsql-sql

Roberto Bertolusso <rb(at)desinet-sa(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Francisco Reyes 2001-01-26 06:23:49 How to drop all tables?
Previous Message Marco DI NARDO 2001-01-25 19:46:50 R: change owner on a table

Browse pgsql-sql by date

  From Date Subject
Next Message Ron Sofrin 2001-01-26 03:57:36 Invoking sql functions through jdbc
Previous Message Tom Lane 2001-01-26 03:35:46 Re: Rule not invoked in 7.1