From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | Marek Lewczuk <newsy(at)lewczuk(dot)com>, Lista dyskusyjna pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: CONCAT function |
Date: | 2003-09-16 14:13:19 |
Message-ID: | Pine.LNX.4.33.0309160812570.4177-100000@css120.ihs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 16 Sep 2003, Richard Huxton wrote:
> 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.
there's a switch in MySQL that makes it behave properly.
Given the third choice, I'd throw the switch.
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-09-16 14:18:40 | Re: Rules question |
Previous Message | Doug McNaught | 2003-09-16 14:12:01 | Re: update field using substrings of another field |