Re: dynamic crosstab - Mailing list pgsql-general

From Joe Conway
Subject Re: dynamic crosstab
Date
Msg-id 47BAF005.8040105@joeconway.com
Whole thread Raw
In response to Re: dynamic crosstab  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
Alvaro Herrera wrote:
> Joe Conway wrote:
>> It occurs to me that it shouldn't be terribly difficult to make an
>> alternate version of crosstab() that returns an array rather than tuples
>> (back when crosstab() was first written, Postgres didn't support NULL
>> array elements). Is this worth considering for 8.4?
>
> How about returning generic rows?  Is that possible?  It would be really
> neat if you didn't have to specify the return type in the query that
> invoked the crosstab.

Yeah, I was thinking about that as well. I'm not sure how difficult it
would be. Hopefully I'll be able to find some time to play with it in
the next month or so.

> I keep wondering if there's a way to "pivot" (transpose) a result set
> defined by the standard.

I've looked at SQL2003 and couldn't find anything, but then again I
could have easily missed it.

Joe

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: dynamic crosstab
Next
From: Erik Jones
Date:
Subject: Re: questions about very large table and partitioning