X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 063DA475CE7 for ; Mon, 24 Feb 2003 20:22:32 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 25133-01 for ; Mon, 24 Feb 2003 20:22:03 -0500 (EST) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id 64A17475FF9 for ; Mon, 24 Feb 2003 17:33:47 -0500 (EST) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2855450; Mon, 24 Feb 2003 14:33:48 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Jeff Boes , pgsql-sql@postgresql.org Subject: Re: Denormalizing during select Date: Mon, 24 Feb 2003 14:33:49 -0800 X-Mailer: KMail [version 1.4] References: <988d394c6d80ecd1396eac17ff787470@news.teranews.com> In-Reply-To: <988d394c6d80ecd1396eac17ff787470@news.teranews.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200302241433.49502.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/537 X-Sequence-Number: 11935 Jeff, > > I have two tables (A and B) in a one-to-many relationship. When > > retrieving data from one table (A), I need to denormalize the tables > > during a select so that values of a column in the many table (B) appear > > as a list in one field of the output. >=20 > Well, the straightforward way to do this would be with a function: Can you post the start of this thread? I think there's a more efficient wa= y=20 using custom aggregates, but somhow I never received the original question. --=20 -Josh Berkus Aglio Database Solutions San Francisco