Turning a subselect into an array

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Turning a subselect into an array
Дата
Msg-id 20041028223729.GF55164@decibel.org
обсуждение исходный текст
Ответы Re: Turning a subselect into an array  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
I'm sure this has been answered before, but the search seems to be down
again.

How can I convert the results of a subselect into an array? IE:

CREATE TABLE a(a int, b int, c int[]);
INSERT INTO table_a
    SELECT a, b, (SELECT c FROM table_c WHERE table_c.parent = table_b.id)
        FROM table_b
;
--
Jim C. Nasby, Database Consultant               decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Sorting street addresses
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Derived tables?