X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 374429FA65C for ; Wed, 21 Jun 2006 15:25:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 32859-03 for ; Wed, 21 Jun 2006 15:25:50 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 3F9BA9F9CC1 for ; Wed, 21 Jun 2006 15:25:50 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from web31803.mail.mud.yahoo.com (web31803.mail.mud.yahoo.com [68.142.207.66]) by svr4.postgresql.org (Postfix) with SMTP id 7EA175AF090 for ; Wed, 21 Jun 2006 18:25:49 +0000 (GMT) Received: (qmail 85811 invoked by uid 60001); 21 Jun 2006 18:24:41 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=EIgPYCNIV8TFhgQsAbQlEkRIq9LQXgKN7+0myWte0Irw2TGf2AMGMajPApJBi/p3tSkDJTDHG+8z/WddcbF15tbZ5MVgvUInEGMxtNNzSZc2NAtDRcFPeN7R8rO6emtaMaNNIhZAHFgUN0w9+ksqQAz2xudrefty2H4RyRBqPLc= ; Message-ID: <20060621182441.85807.qmail@web31803.mail.mud.yahoo.com> Received: from [24.54.196.198] by web31803.mail.mud.yahoo.com via HTTP; Wed, 21 Jun 2006 11:24:41 PDT Date: Wed, 21 Jun 2006 11:24:41 -0700 (PDT) From: Richard Broersma Jr Subject: Re: How to get a result in one row To: Frank Bax , pgsql-sql@postgresql.org In-Reply-To: <5.2.1.1.0.20060621140420.04580180@pop6.sympatico.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/241 X-Sequence-Number: 25477 > >I'd like to get the result in only one row: > > id | nick > >------+------ > >22192 | A,T > This question is in the archives (probably more than once). The answer is...> > Read the online docs about aggregate functions. There is an example that > does (almost) exactly what you are asking. Where you referring to the tread regarding the LTREE contrib module for postgresql? http://archives.postgresql.org/pgsql-general/2006-06/msg00745.php I know I've seen this done using cursors in PL-PGSQL, but I would be interested if there was a solution with pre-existing aggregates. Regards, Richard Broersma Jr.