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 86279D1D5D9 for ; Mon, 8 Mar 2004 15:53:14 +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 34440-03 for ; Mon, 8 Mar 2004 11:53:12 -0400 (AST) Received: from localhost.localdomain (unknown [200.208.40.130]) by svr1.postgresql.org (Postfix) with ESMTP id 99B24D1D803 for ; Mon, 8 Mar 2004 11:53:06 -0400 (AST) Received: from yahoo.com.br (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id i28G2rNM003952 for ; Mon, 8 Mar 2004 13:02:54 -0300 Message-ID: <404C992D.1060407@yahoo.com.br> Date: Mon, 08 Mar 2004 13:02:53 -0300 From: Daniel Henrique Alves Lima Reply-To: email_daniel_h@yahoo.com.br User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Functional index and string concatenation References: <404C8F08.2070403@yahoo.com.br> <1078759686.10233.1.camel@elb_lx.onesystem.ca> In-Reply-To: <1078759686.10233.1.camel@elb_lx.onesystem.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/59 X-Sequence-Number: 17158 Yes, i was searching for the name of equivalent function to "||" operator... Now, i've got a new problem: I need to concat three values (two column values and a sepator constant). But from documentation: " The function in the index definition can take more than one argument, but they must be table columns, not constants" and "there cannot be multicolumn indexes that contain function calls". Maybe i should to create a new pgsql function. Thanks ! Edmund Bacon wrote: >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=# > > >