pg SQL question

Поиск
Список
Период
Сортировка
От Ed L.
Тема pg SQL question
Дата
Msg-id 200501221403.58518.pgsql@bluepolka.net
обсуждение исходный текст
Ответы Re: pg SQL question  (Richard Poole <rp@guests.deus.net>)
Re: pg SQL question  (David Fetter <david@fetter.org>)
Список pgsql-general
There's probably an obvious answer for this, but I couldn't see it in the
docs.  What's the simplest way to concatenate multiple same-column values
in SQL?

For example, suppose I have table foo (key integer, id integer, entry
varchar) with data

    key    id    entry
    1    1    "Four score and seven years ago our fathers "
    1    2    "brought forth on this continent, a new nation, "
    1    3    "conceived in Liberty, and dedicated to the "
    1    4    "proposition that all men are created equal."

and I want to produce the following result:

"Four score and seven years ago our fathers brought forth on this continent,
a new nation, conceived in Liberty, and dedicated to the proposition that
all men are created equal."

I know this could be done writing a plpgsql function, but it seems so basic,
I thought there might be something I'm overlooking.

TIA.

Ed


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Data format and display
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SSL