Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DD7159FB766 for ; Thu, 28 Jun 2007 12:22:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 92238-03-3 for ; Thu, 28 Jun 2007 12:21:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 686519FB673 for ; Thu, 28 Jun 2007 12:21:57 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1I3voi-0000TL-Pq for pgsql-sql@postgresql.org; Thu, 28 Jun 2007 11:21:56 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 74FFB3F9E; Thu, 28 Jun 2007 11:21:51 -0400 (EDT) Date: Thu, 28 Jun 2007 11:21:51 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: record fields as columns in reports Message-ID: <20070628152151.GD29684@phlogiston.dyndns.org> References: <20070628144615.GQ72343@spoetnik.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070628144615.GQ72343@spoetnik.xs4all.nl> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/236 X-Sequence-Number: 28726 On Thu, Jun 28, 2007 at 04:46:15PM +0200, Reinoud van Leeuwen wrote: > And I would like an output with something like: > > 06/22 06/23 06/24 06/25 > ERROR1 10 10 9 8 > ERROR2 250 300 220 200 > ERROR3 4 2 0 0 I think this should be possible with the "crosstab" functionality delivered in Joe Conway's tablefunc package, in contrib/. A -- Andrew Sullivan | ajs@crankycanuck.ca I remember when computers were frustrating because they *did* exactly what you told them to. That actually seems sort of quaint now. --J.D. Baldwin