pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Henrique Alves Lima <email_daniel_h@yahoo.com.br>
To: pgsql-sql@postgresql.org
Subject: Re: Functional index and string concatenation
Date: Mon, 08 Mar 2004 13:02:53 -0300
Message-ID: <404C992D.1060407@yahoo.com.br> (raw)
In-Reply-To: <1078759686.10233.1.camel@elb_lx.onesystem.ca>
References: <404C8F08.2070403@yahoo.com.br>
	<1078759686.10233.1.camel@elb_lx.onesystem.ca>

    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=# 
>
>  
>





view thread (5+ messages)  latest in thread

Message-ID: <404C992D.1060407@yahoo.com.br>
Permalink:  ../404C992D.1060407@yahoo.com.br/
Also on:    postgresql.org/message-id/404C992D.1060407@yahoo.com.br

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: email_daniel_h@yahoo.com.br
  Subject: Re: Functional index and string concatenation
  In-Reply-To: <404C992D.1060407@yahoo.com.br>

* 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