From: Sascha Schumann <sas@schell.de>
To: Remigiusz Sokolowski <rems@gdansk.sprint.pl>
Cc: pgsql-sql@hub.org
Subject: Re: [SQL] index on aggregate function
Date: Sat, 6 Feb 1999 13:49:34 +0100
Message-ID: <19990206134934.A703@schell.de> (raw)
In-Reply-To: <Pine.GS4.4.02A.9902010949440.6052-100000@netra.gdansk.sprint.pl>
References: <19990130162017.A3151@schell.de>
<Pine.GS4.4.02A.9902010949440.6052-100000@netra.gdansk.sprint.pl>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: sas@schell.de, rems@gdansk.sprint.pl, pgsql-sql@hub.org
Subject: Re: [SQL] index on aggregate function
In-Reply-To: <19990206134934.A703@schell.de>
References: <19990130162017.A3151@schell.de> <Pine.GS4.4.02A.9902010949440.6052-100000@netra.gdansk.sprint.pl> <19990206134934.A703@schell.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox