Index on a function(field) - Mailing list pgsql-general

From Gabriel Fernandez
Subject Index on a function(field)
Date
Msg-id 3AFC246A.78908698@unica.edu
Whole thread Raw
Responses Re: Index on a function(field)  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 :-)


pgsql-general by date:

Previous
From: Philip Crotwell
Date:
Subject: Re: defunct postmasters
Next
From: Philip Crotwell
Date:
Subject: Re: defunct postmasters