Index on substring? - Mailing list pgsql-general

From Jeff Eckermann
Subject Index on substring?
Date
Msg-id 08CD1781F85AD4118E0800A0C9B8580B094727@NEZU
Whole thread Raw
Responses CREATE FUNCTION LANGUAGE C
Re: Index on substring?
List pgsql-general
I thought this was possible, but searching the archives & docs I can't find
any reference to it...
Am I doing something wrong?

jeffe@kiyoko=> psql -V
psql (PostgreSQL) 7.0.0

jeffe@kiyoko=> uname -a
FreeBSD kiyoko.la.verio.net 4.0-STABLE FreeBSD 4.0-STABLE #0: Thu Apr 27
10:44:07 CDT 2000     root@:/usr/src/sys/compile/KIYOKO  i386

extracts=# create index c_namesum_i on customers (substr
(bill_company,1,5));
ERROR:  parser: parse error at or near "1"
extracts=# select substr (bill_company, 1, 5) from customers limit 10;
 substr
--------
 RoadW
 Beliz
 Radio
 Trill
 R2000
 Data
 Inter
 AEC M
 G2 Gr
 MindB
(10 rows)

extracts=# create index c_namesum_i on customers (substring(bill_company
from 1 for 5));
ERROR:  parser: parse error at or near "substring"
extracts=# select substring (bill_company from 1 for 5) from customers limit
10;
 substr
--------
 RoadW
 Beliz
 Radio
 Trill
 R2000
 Data
 Inter
 AEC M
 G2 Gr
 MindB
(10 rows)

extracts=#

pgsql-general by date:

Previous
From: Alex Pilosov
Date:
Subject: Re: Re[2]: Pg.pm question
Next
From: "Roderick A. Anderson"
Date:
Subject: Re: R: PostgreSQL book