From: | Sascha Schumann <sas(at)schell(dot)de> |
---|---|
To: | Remigiusz Sokolowski <rems(at)gdansk(dot)sprint(dot)pl> |
Cc: | pgsql-sql(at)hub(dot)org |
Subject: | Re: [SQL] index on aggregate function |
Date: | 1999-02-06 12:49:34 |
Message-ID: | 19990206134934.A703@schell.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Mon, Feb 01, 1999 at 09:50:57AM +0100, Remigiusz Sokolowski wrote:
> > I somewhere read that it is possible to create an index on aggregate functions
> > in PostgreSQL. Which syntax do I have to use for it?
> >
> > test=> CREATE TABLE test ( name VARCHAR(32) );
> > CREATE
> > test=> CREATE INDEX test_idx ON test lower(name);
> > ERROR: parser: parse error at or near "lower"
> >
> > gives me a parser error.
>
> Right syntax is
> CREATE INDEX test_idx ON test (lower(name) text_ops);
> I try it and index was generated without error
> Rem
Well, that exact statement gives me:
ERROR: BuildFuncTupleDesc: function 'lower(varchar)' does not exist
I also tried varchar_ops and char_ops instead of text_ops, but that does not
resolve the problem. I'm using PostgreSQL 6.4.2 on Linux without problems so
far.
--
Regards,
Sascha Schumann |
Consultant | finger sas(at)schell(dot)de
| for PGP public key
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-02-06 17:27:47 | Re: [SQL] Functional Indexes |
Previous Message | Bryan White | 1999-02-05 22:54:05 | Functional Indexes |