Re: dynamic crosstab

From: Joe Conway <mail(at)joeconway(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Erik Jones <erik(at)myemma(dot)com>, Klein Balazs <Balazs(dot)Klein(at)t-online(dot)hu>, 'Tino Wildenhain' <tino(at)wildenhain(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: dynamic crosstab
Date: 2008-02-19 15:04:37
Message-ID: 47BAF005.8040105@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Erik Jones 2008-02-19 15:30:12 Re: questions about very large table and partitioning
Previous Message Alvaro Herrera 2008-02-19 14:56:08 Re: dynamic crosstab