Re: Functional index and string concatenation

From: Edmund Bacon <ebacon(at)onesystem(dot)com>
To: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Functional index and string concatenation
Date: 2004-03-08 15:28:07
Message-ID: 1078759686.10233.1.camel@elb_lx.onesystem.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, 2004-03-08 at 08:19, Daniel Henrique Alves Lima wrote:
> Is there a way to create a "functional index" over a string
> concatenation of two columns ?
>
> Thanks.
>
Like this?

test=# create table strtable (x int, str1 text, str2 text);
CREATE TABLE
test=# create index str_idx on strtable( textcat(str1, str2) );
CREATE INDEX
test=#

--
Edmund Bacon <ebacon(at)onesystem(dot)com>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2004-03-08 15:48:35 Re: Functional index and string concatenation
Previous Message Daniel Henrique Alves Lima 2004-03-08 15:19:36 Functional index and string concatenation