Re: create index with user-defined function

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Choosna Makarasara <choosna(at)rajavithi(dot)go(dot)th>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: create index with user-defined function
Date: 2000-08-18 01:45:18
Message-ID: Pine.BSF.4.10.10008171840220.99143-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I believe not. I believe in 7.0 (and earlier) functional indexes
may reference multiple columns, but only as arguments to the
function. I'm not sure if this has changed in current sources
or not (I'd guess not).

So, if you had a function that took vi_name and vi_id both,
you could make a functional index on that.

Stephan Szabo
sszabo(at)bigpanda(dot)com

On Fri, 18 Aug 2000, Choosna Makarasara wrote:

> Dear all,
> I sent this message a few days ago without response so I post it again
> in case someone may help me.
> I use PostgreSQL 6.5 and create a function tmod(bpchar) written in C.
> When I try to create index using the function I have the
> following problem.
> ------ 1-------
> mydb=> CREATE INDEX vi_id ON village (vi_name bpchar_ops,vi_id
> bpchar_ops);
> CREATE
> this works find.
> ------ 2 -------
> mydb=> CREATE INDEX tmodvi_name ON village (TMOD(vi_name) bpchar_ops);
> CREATE
> this also works fine.
> but when I try
> ------ 3 -------
> mydb=> CREATE INDEX xxvi_name ON village (TMOD(vi_name) bpchar_ops,vi_id
>
> bpchar_ops);
> ERROR: parser: parse error at or near ","
>
> What wrong with this? Can I create index multiple column index with
> user-defined function??
>
> Choosna Makarasara
>
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message prem khanna j 2000-08-18 04:09:44 postgresql/weblogic
Previous Message Choosna Makarasara 2000-08-18 01:40:48 create index with user-defined function