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

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: BUG #1947: Enhancement Request - CONCAT() function
Дата
Msg-id s34a3967.008@gwmta.wicourts.gov
обсуждение исходный текст
Ответ на BUG #1947: Enhancement Request - CONCAT() function  ("Tony Marston" <tony@marston-home.demon.co.uk>)
Список pgsql-bugs
If you are striving for portability, perhaps you are using Java as your
programming language.  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:
=20
select {fn CONCAT(field1, ' ', field2)}
=20
However, for maximum portability, you should probably use:
=20
select {fn CONCAT({fn CONCAT(field1, ' ')}, field2)}
=20
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.)
=20
-Kevin
=20
P.S.  A more professional and cooperative tone in any future posts
would be appreciated.
=20
=20
>>> "Tony Marston" <tony@marston-home.demon.co.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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #1947: Enhancement Request - CONCAT() function
Следующее
От: tony@marston-home.demon.co.uk
Дата:
Сообщение: Re: BUG #1947: Enhancement Request - CONCAT() function