Re: BUG #1947: Enhancement Request - CONCAT() function - Mailing list pgsql-bugs

From Tony Marston
Subject Re: BUG #1947: Enhancement Request - CONCAT() function
Date
Msg-id 000001c5cdde$366c05d0$b9f5e5d4@ajmnotebook
Whole thread Raw
In response to BUG #1947: Enhancement Request - CONCAT() function  ("Tony Marston" <tony@marston-home.demon.co.uk>)
List pgsql-bugs
> -----Original Message-----
> From: Kevin Grittner [mailto:Kevin.Grittner@wicourts.gov]=20
> Sent: 10 October 2005 15:50
> To: tony@marston-home.demon.co.uk; pgsql-bugs@postgresql.org
> Subject: Re: [BUGS] BUG #1947: Enhancement Request - CONCAT() function
>=20
>=20
> If you are striving for portability, perhaps you are using=20
> 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=20
> from the fact that the volunteers in the PostgreSQL community=20
> have put the effort into the JDBC driver to support the=20
> escape sequence for portable string concatenation.  This=20
> works in PostgreSQL:
>=20=20
> select {fn CONCAT(field1, ' ', field2)}
>=20=20
> However, for maximum portability, you should probably use:
>=20=20
> select {fn CONCAT({fn CONCAT(field1, ' ')}, field2)}
>=20=20
> Using more than two parameters does not work in the JDBC=20
> driver for at least one commercial DBMS product.  (I found=20
> one where there is no exception thrown for the additional=20
> parameters; they are silently
> discarded.)
>=20=20
> -Kevin
>=20=20
> P.S.  A more professional and cooperative tone in any future=20
> posts would be appreciated.

I will try.

Tony Marston

http://www.tonymarston.net=20


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

pgsql-bugs by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: BUG #1947: Enhancement Request - CONCAT() function
Next
From: "Tony Marston"
Date:
Subject: Re: BUG #1947: Enhancement Request - CONCAT() function