Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 0CDDF9FBD26 for ; Thu, 28 Jun 2007 12:26:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 05402-05-2 for ; Thu, 28 Jun 2007 12:26:15 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.244]) by postgresql.org (Postfix) with ESMTP id 4101D9FC173 for ; Thu, 28 Jun 2007 12:26:14 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so116874ana for ; Thu, 28 Jun 2007 08:26:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MHBzQeEL1Ws+bIXJ9yFAPwWFoABOIUtNbZCOKYX2yY7CbFZ9htCiUE9ALoNEKqoeCbdEZ9a+UJ844WSEpx++RPK7/AqmWRcFQqq2uBO6SH1lpeYNfZsErA2yZ9NzYeRnyOU0MEa96QVvkHQ9i1PAqDS9yS4sbo0iGDhEIDDu7hw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fLZLVincAP0dDh+FWefE0LMVWko0kNxkAQLXssNIbrZ+AyOxOVWfmuyxwtc7TjWCgSKX8R59ZwKgJZZ85omS3lh2J+/1vghqgMHzwPMsruOt2GC3PdrJ4+gVbxmeO6gjtOKZBi74MyILhTe83K/41YiT+nmv7pUGnBqPK9agqvY= Received: by 10.100.123.9 with SMTP id v9mr1002613anc.1183044372542; Thu, 28 Jun 2007 08:26:12 -0700 (PDT) Received: by 10.100.33.20 with HTTP; Thu, 28 Jun 2007 08:26:12 -0700 (PDT) Message-ID: Date: Thu, 28 Jun 2007 10:26:12 -0500 From: "=?UTF-8?Q?Rodrigo_De_Le=C3=B3n?=" To: pgsql-sql@postgresql.org Subject: Re: record fields as columns in reports In-Reply-To: <20070628144615.GQ72343@spoetnik.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070628144615.GQ72343@spoetnik.xs4all.nl> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/237 X-Sequence-Number: 28727 On 6/28/07, Reinoud van Leeuwen wrote: > So the table I store the errormessages in has a format like this: > > CREATE TABLE repport_history > ( > rundate date, > errordescription character varying(255), > number bigint > ) > > > 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 1. See contrib/tablefunc. 2. PivotTables (OpenOffice.org or Excel).