Re: crosstab: ERROR: invalid return type

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Cesar A <cesar(dot)carbonara(at)gmail(dot)com>
Cc: pgsql-es-ayuda <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: crosstab: ERROR: invalid return type
Date: 2010-07-01 22:39:49
Message-ID: 1278023857-sup-12@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Excerpts from Cesar A's message of jue jul 01 12:39:07 -0400 2010:

> SELECT est_002, agri02_002, count(*) FROM consulta_agri04 GROUP BY
> agri02_002, est_002 ORDER BY est_002, agri02_002; est_002 |

> Con crosstab:
>
> SELECT * FROM public.crosstab('SELECT est_002, agri02_002, count(*) FROM
> consulta_agri04 GROUP BY agri02_002, est_002 ORDER BY est_002, agri02_002')
> AS lista("estado" text, "renglon" text, "cantidad" text);
> ERROR: invalid return type
> DETAIL: SQL rowid datatype does not match return rowid datatype.

Hmm, ¿no será que los tipos de la tabla son varchar en vez de text? No
tengo mucha experiencia con crosstab pero eso suena plausible.

¿Qué versión de Postgres estás usando?

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Cesar A 2010-07-02 03:33:30 Re: crosstab: ERROR: invalid return type
Previous Message Miguel Angel Hernandez Moreno 2010-07-01 17:38:55 Re: Postgres Contrib