Re: CONCAT function - Mailing list pgsql-general

From Richard Huxton
Subject Re: CONCAT function
Date
Msg-id 200309161451.55262.dev@archonet.com
Whole thread Raw
In response to Re: CONCAT function  ("scott.marlowe" <scott.marlowe@ihs.com>)
Responses Re: CONCAT function  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-general
On Tuesday 16 September 2003 14:35, scott.marlowe wrote:
> On Tue, 16 Sep 2003, Marek Lewczuk wrote:
> > Hello,
> > As I'm in the middle of the migration process form mysql to pg I found
> > that there is no CONCAT function which is available in mysql. Can
> > anybody tell me how to implement this function using plPERL or plPGSQL
> > language ?
>
> What's wrong with using the SQL spec || operator?

Because in mysql, SELECT 'a' || 'b' is treated as 'a' OR 'b' and you end up
with a return value of 0. Ho hum.

If I had to choose between coding concat() for PG or the standard operator for
mysql, I think I'd do the same.

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: Lamar Owen
Date:
Subject: Re: State of Beta 2
Next
From: "Dave [Hawk-Systems]"
Date:
Subject: update field using substrings of another field