Index on a function(field)

From: Gabriel Fernandez <gabi(at)unica(dot)edu>
To: PostgreSQL-general <pgsql-general(at)postgreSQL(dot)org>
Subject: Index on a function(field)
Date: 2001-05-11 17:42:02
Message-ID: 3AFC246A.78908698@unica.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Is it possible to create an index using a function(field) sintaxis ?

For instance:

CREATE INDEX "i1_cdu" on "cdu" using btree ( substr(cdu_code,1,1)
"varchar_ops" );

If not, should I alter the table to include a field with the value
'substr(codigo,1,1)'.

Thanks

Gabi :-)

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ian Lance Taylor 2001-05-11 17:49:04 Re: PL/Perl without shared libperl.a
Previous Message Ed Loehr 2001-05-11 17:41:00 name truncation problem in 7.0.0