Re: generic crosstab ?

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: generic crosstab ?
Дата
Msg-id 4F972365.7070302@joeconway.com
обсуждение исходный текст
Ответ на Re: generic crosstab ?  ("David Johnston" <polobo@yahoo.com>)
Ответы Re: generic crosstab ?  (Andreas <maps.on@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: generic crosstab ?
Следующее
От: Andreas
Дата:
Сообщение: Re: generic crosstab ?