From: Joe Conway <mail@joeconway.com>
To: David Johnston <polobo@yahoo.com>
Cc: Andreas <maps.on@gmx.net>
Cc: Samuel Gendler <sgendler@ideasculptor.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: generic crosstab ?
Date: Tue, 24 Apr 2012 15:04:21 -0700
Message-ID: <4F972365.7070302@joeconway.com> (raw)
In-Reply-To: <04d701cd2263$323e1ad0$96ba5070$@yahoo.com>
References: <4F97069B.7020303@gmx.net>
<CAEV0TzBMbQo5+HZ8B+JgFG9Z7-G6hP_hW9E2R4yor2oKNmeYHA@mail.gmail.com>
<4F971C7F.7050803@gmx.net>
<04d701cd2263$323e1ad0$96ba5070$@yahoo.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mail@joeconway.com, polobo@yahoo.com, maps.on@gmx.net, sgendler@ideasculptor.com
Subject: Re: generic crosstab ?
In-Reply-To: <4F972365.7070302@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox