Re: Concatenation through SQL

Поиск
Список
Период
Сортировка
От Andreas Kretschmer
Тема Re: Concatenation through SQL
Дата
Msg-id 20071221105813.GA18247@KanotixBox
обсуждение исходный текст
Ответ на Concatenation through SQL  ("Philippe Lang" <philippe.lang@attiksystem.ch>)
Список pgsql-sql
Philippe Lang <philippe.lang@attiksystem.ch> schrieb:

2 ways:

* You can use something like this:

test=*# select * from a;id | val
----+----- 1 | foo 2 | bar
(2 rows)

test=*# select array_to_string(array(select val from a), ', ');array_to_string
-----------------foo, bar
(1 row)


* comma-aggregate, see
http://www.zigo.dhs.org/postgresql/#comma_aggregate


Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°


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

Предыдущее
От: "Philippe Lang"
Дата:
Сообщение: Concatenation through SQL
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: Re: Concatenation through SQL