Index on array element

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Index on array element
Date: 2003-11-25 00:55:07
Message-ID: 200311241655.07430.scrawford@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How can I create an index on an array element? I seem to recall having
done this in the past but I don't recall how.

steve=# \d foo
Table "public.foo"
Column | Type | Modifiers
-----------+--------+-----------
textarray | text[] |

steve=# create index foodex on foo (textarray[3]);
ERROR: parser: parse error at or near "[" at character 38

steve=# select version();
PostgreSQL 7.3.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3
20030226 (prerelease) (SuSE Linux)

Cheers,
Steve

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Randolf Richardson 2003-11-25 01:47:05 Re: Where is Postgesql ? - MYSQL SURPRISES WITH MAXDB /
Previous Message Alex Satrapa 2003-11-25 00:28:03 Re: Where is Postgesql ? - MYSQL SURPRISES WITH MAXDB /