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

From Remigiusz Sokolowski
Subject Re: [SQL] index on aggregate function
Date
Msg-id Pine.GS4.4.02A.9902010949440.6052-100000@netra.gdansk.sprint.pl
Whole thread Raw
In response to index on aggregate function  (Sascha Schumann <sas@schell.de>)
Responses Re: [SQL] index on aggregate function  (Sascha Schumann <sas@schell.de>)
List pgsql-sql
> 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

-------------------------------------------------------------------*------------
Remigiusz Sokolowski      e-mail: rems@gdansk.sprint.pl           * *
-----------------------------------------------------------------*****----------


pgsql-sql by date:

Previous
From: Remigiusz Sokolowski
Date:
Subject: Re: [SQL] Character type name?? How to lower case it?
Next
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: PL/pgSQL / SPI and UTILITY statements