Re: [SQL] index on aggregate function - Mailing list pgsql-sql

From Sascha Schumann
Subject Re: [SQL] index on aggregate function
Date
Msg-id 19990206134934.A703@schell.de
Whole thread Raw
In response to Re: [SQL] index on aggregate function  (Remigiusz Sokolowski <rems@gdansk.sprint.pl>)
Responses Re: [SQL] index on aggregate function
List 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@schell.de
                                            | for PGP public key

pgsql-sql by date:

Previous
From: "Bryan White"
Date:
Subject: Functional Indexes
Next
From: Tom Lane
Date:
Subject: Re: [SQL] Functional Indexes