From: | "Jim C(dot) Nasby" <decibel(at)decibel(dot)org> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Turning a subselect into an array |
Date: | 2004-10-28 22:37:29 |
Message-ID: | 20041028223729.GF55164@decibel.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs 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(at)decibel(dot)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?"
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2004-10-28 23:21:52 | Re: Turning a subselect into an array |
Previous Message | Ian Barwick | 2004-10-28 20:34:27 | FAQ and Windows |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-10-28 22:39:39 | Re: Derived tables? |
Previous Message | Joshua D. Drake | 2004-10-28 21:55:41 | Re: Sorting street addresses |