Skip site navigation (1) Skip section navigation (2)

Turning a subselect into an array

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-docspgsql-general
I'm sure this has been answered before, but the search seems to be down

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

CREATE TABLE a(a int, b int, c int[]);
    SELECT a, b, (SELECT c FROM table_c WHERE table_c.parent =
        FROM table_b
Jim C. Nasby, Database Consultant               decibel(at)decibel(dot)org 
Give your computer some brain candy! 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-docs by date

Next:From: Michael FuhrDate: 2004-10-28 23:21:52
Subject: Re: Turning a subselect into an array
Previous:From: Ian BarwickDate: 2004-10-28 20:34:27
Subject: FAQ and Windows

pgsql-general by date

Next:From: Tom LaneDate: 2004-10-28 22:39:39
Subject: Re: Derived tables?
Previous:From: Joshua D. DrakeDate: 2004-10-28 21:55:41
Subject: Re: Sorting street addresses

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group