DefineIndex: function 'lower(varchar)' does not exist !?!?!?

From: Philip Hallstrom <philip(at)adhesivemedia(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: DefineIndex: function 'lower(varchar)' does not exist !?!?!?
Date: 2000-06-08 18:42:09
Message-ID: 200006081900.MAA67608@illiad.adhesivemedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi -
I swore that somewhere I read that you could create an index on a
function of one of the columns to speed things up... instead of having to
do:
SELECT... WHERE LOWER(col) = LOWER('string')
but I'm having a devil of a time getting it to work. Can anyone tell me
what I'm doing wrong? Do I need to create a separate SQL function called
say "varcharlower" which does "lower(text(x))" ???
Thanks!
test=> create table foo ( x varchar(10));
CREATE
test=> create index foo_idx on foo (lower(x));
ERROR: DefineIndex: function 'lower(varchar)' does not exist
test=> create index foo_idx on foo (lower(text(x)));
ERROR: parser: parse error at or near "("
test=> create table bar ( x text);
CREATE
test=> create index foo_idx on bar (lower(x));
CREATE

Browse pgsql-general by date

  From Date Subject
Next Message mikeo 2000-06-08 21:47:25 Re: Re: PHP and inet data type
Previous Message Neil Thompson 2000-06-08 18:11:26 Re: Book nearing final form