Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id B52952E0279 for ; Sat, 1 Dec 2007 00:08:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 68824-05 for ; Sat, 1 Dec 2007 00:08:00 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id DE2E92E01DE for ; Sat, 1 Dec 2007 00:07:37 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lB147ata011004; Fri, 30 Nov 2007 23:07:36 -0500 (EST) To: "ronald tabada" cc: pgsql-sql@postgresql.org Subject: Re: Crosstab limitation... In-reply-to: <29b0500c0711301947w312866d0i27139c6b759b88bf@mail.gmail.com> References: <29b0500c0711301947w312866d0i27139c6b759b88bf@mail.gmail.com> Comments: In-reply-to "ronald tabada" message dated "Sat, 01 Dec 2007 11:47:23 +0800" Date: Fri, 30 Nov 2007 23:07:36 -0500 Message-ID: <11003.1196482056@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/1 X-Sequence-Number: 29693 "ronald tabada" writes: > ... when I tried > producing reports with more than 17 columns it displayed the following > error message: > ERROR: invalid return type > SQL state: 42601 > Detail: Query-specified return tuple has 39 columns but crosstab returns 17. Worksforme. Maybe you need to show us exactly what you did. regards, tom lane