Re: [GENERAL] Index on a function(field)

2001-05-11 Thread Tom Lane
Gabriel Fernandez <[EMAIL PROTECTED]> writes: > Is it possible to create an index using a function(field) sintaxis ? Yes, but *only* on a function of one or more raw fields. > CREATE INDEX "i1_cdu" on "cdu" using btree ( substr(cdu_code,1,1) > "varchar_ops" ); This doesn't work because you hav

[GENERAL] Index on a function(field)

2001-05-11 Thread Gabriel Fernandez
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 :-) --