Re: Crosstab limitation...

Lists: pgsql-sql
From: "ronald tabada" <rtabada(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Crosstab limitation...
Date: 2007-12-01 03:47:23
Message-ID: 29b0500c0711301947w312866d0i27139c6b759b88bf@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Good day... I'm new in postgresql and I used PostgreSQL 8.2. I tried
generating a query that can convert rows into columns. I was
happy when I discovered the crosstab function. But 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.

Can anyone help me? How can I use crosstab w/ more than 17 columns?


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "ronald tabada" <rtabada(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Crosstab limitation...
Date: 2007-12-01 04:07:36
Message-ID: 11003.1196482056@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

"ronald tabada" <rtabada(at)gmail(dot)com> 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