X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 02BAFD1DB99 for ; Mon, 8 Mar 2004 15:28:08 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 24180-10 for ; Mon, 8 Mar 2004 11:28:07 -0400 (AST) Received: from happy.onesystem.ca (happy.onesystem.ca [205.206.61.17]) by svr1.postgresql.org (Postfix) with ESMTP id 04E0FD1DB6C for ; Mon, 8 Mar 2004 11:28:03 -0400 (AST) Received: from elb_lx.onesystem.ca ([10.1.1.50]) by happy.onesystem.ca with asmtp (Exim 4.14) id 1B0Mfn-0006TI-63; Mon, 08 Mar 2004 08:28:07 -0700 Subject: Re: Functional index and string concatenation From: Edmund Bacon To: pgsql-sql In-Reply-To: <404C8F08.2070403@yahoo.com.br> References: <404C8F08.2070403@yahoo.com.br> Content-Type: text/plain Message-Id: <1078759686.10233.1.camel@elb_lx.onesystem.ca> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 08 Mar 2004 08:28:07 -0700 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/57 X-Sequence-Number: 17156 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