Re: CONCAT function - Mailing list pgsql-general

From Christopher Browne
Subject Re: CONCAT function
Date
Msg-id m3d6e0rj1o.fsf@wolfe.cbbrowne.com
Whole thread Raw
In response to Re: CONCAT function  (Richard Huxton <dev@archonet.com>)
List pgsql-general
In the last exciting episode, newsy@lewczuk.com ("Marek Lewczuk") wrote:
>> You want to use the || operator, e.g. 'hello' || ' ' || 'world'
>
> I know that, but in my application (which is working on MySQL now) I
> have many querys which use CONCAT function, so I need to implement this
> function is PG - there is no possibility to replace (in short time) all
> of my querys.

Well, then you might implement "CONCAT" in plpgsql.

It will presumably take two values (possibly text, possibly generic),
use ||, inside the function, to catenate them, and then return a text
value.

That should be quite straightforward.
--
wm(X,Y):-write(X),write('@'),write(Y). wm('cbbrowne','ntlug.org').
http://cbbrowne.com/info/lisp.html
Rules of the Evil Overlord  #220. "Whatever my one vulnerability is, I
will fake a  different one. For example, ordering  all mirrors removed
from the palace, screaming and flinching whenever someone accidentally
holds up a mirror, etc. In the climax when the hero whips out a mirror
and thrusts it at my face,  my reaction will be ``Hmm...I think I need
a shave.''"  <http://www.eviloverlord.com/>

pgsql-general by date:

Previous
From: nadiak@parkerglobal.com (N.K.)
Date:
Subject: Re: Connecting to postgres from a romote machhine
Next
From: Christopher Browne
Date:
Subject: Re: Idea for improving speed of pg_restore