Re: generic crosstab ? - Mailing list pgsql-sql

From Joe Conway
Subject Re: generic crosstab ?
Date
Msg-id 4F972365.7070302@joeconway.com
Whole thread Raw
In response to Re: generic crosstab ?  ("David Johnston" <polobo@yahoo.com>)
Responses Re: generic crosstab ?
List pgsql-sql
On 04/24/2012 02:42 PM, David Johnston wrote:
> You must specify the output record structure:
> 
> SELECT crosstab(text, text) AS ( col1_name col1_type [, colN_name
> colN_type]* )
> 
> Whether this relates to the “materialization node” message you are
> receiving I have no idea.

The error is because you are selecting from a set returning function in
the target list rather than the from clause. It should be more like:

SELECT * FROM crosstab(text, text) AS ( col1_name col1_type [, colN_name
> colN_type]* )

HTH,

Joe

-- 
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support


pgsql-sql by date:

Previous
From: "David Johnston"
Date:
Subject: Re: generic crosstab ?
Next
From: Andreas
Date:
Subject: Re: generic crosstab ?