Re: BUG #1947: Enhancement Request - CONCAT() function

From: "Tony Marston" <tony(at)marston-home(dot)demon(dot)co(dot)uk>
To: "'Kevin Grittner'" <Kevin(dot)Grittner(at)wicourts(dot)gov>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1947: Enhancement Request - CONCAT() function
Date: 2005-10-10 21:04:25
Message-ID: 000001c5cdde$366c05d0$b9f5e5d4@ajmnotebook
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> -----Original Message-----
> From: Kevin Grittner [mailto:Kevin(dot)Grittner(at)wicourts(dot)gov]
> Sent: 10 October 2005 15:50
> To: tony(at)marston-home(dot)demon(dot)co(dot)uk; pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] BUG #1947: Enhancement Request - CONCAT() function
>
>
> If you are striving for portability, perhaps you are using
> Java as your programming language.

Nice try, but I don't use Java. I'm a COBOL man myself :)

Actually, I am currently developing software with PHP that I don't want tied
to a single DBMS, which is my I am looking for portability between MySQL,
PostgreSQL and Oracle.

> If so, you could benefit
> from the fact that the volunteers in the PostgreSQL community
> have put the effort into the JDBC driver to support the
> escape sequence for portable string concatenation. This
> works in PostgreSQL:
>
> select {fn CONCAT(field1, ' ', field2)}
>
> However, for maximum portability, you should probably use:
>
> select {fn CONCAT({fn CONCAT(field1, ' ')}, field2)}
>
> Using more than two parameters does not work in the JDBC
> driver for at least one commercial DBMS product. (I found
> one where there is no exception thrown for the additional
> parameters; they are silently
> discarded.)
>
> -Kevin
>
> P.S. A more professional and cooperative tone in any future
> posts would be appreciated.

I will try.

Tony Marston

http://www.tonymarston.net


> >>> "Tony Marston" <tony(at)marston-home(dot)demon(dot)co(dot)uk> 10/08/05
> 6:39 AM >>>
>
> I would like the option to use CONCAT(field1, ' ', field2)
> instead of the vertical bar syntax (field1 || ' ' || field2)
> as this is also available in other popular databases (MySQL,
> ORACLE). I am trying to develop applications which are
> daabase independent, so the use of common SQL syntax is very
> important.
>
>

Browse pgsql-bugs by date

  From Date Subject
Next Message Jim C. Nasby 2005-10-10 23:33:55 Re: BUG #1947: Enhancement Request - CONCAT() function
Previous Message Terry Leffler 2005-10-10 19:19:11 BUG #1951: Multiple instances of postgres.exe running