Re: Crosstab Question

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: David Blewett <david(at)dawninglight(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, David Fetter <david(at)fetter(dot)org>
Subject: Re: Crosstab Question
Date: 2007-08-09 01:36:03
Message-ID: 85DBC72E-DB89-4680-BA54-0BF92ACD1CF1@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Aug 8, 2007, at 19:23 , David Blewett wrote:

> Since the number of questions to be pivoted will vary per
> questionnaire the method should accept a number of columns
> parameter. The crosstab in the tablefunc contrib module expects the
> columns to be explicitly identified before hand. I suppose it could
> be possible to write a simple function to wrap the crosstab_n_cols
> functions to be able to return a variable number, but that seems
> hackish. Are there any other alternatives?

I've done just that in the past. It's pretty straightforward and has
worked fine.

Michael Glaesemann
grzm seespotcode net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2007-08-09 04:55:06 Re: tsearch2: plainto_tsquery() with OR?
Previous Message Scott Ribe 2007-08-09 00:27:33 Re: Take your postgresSql on the road, and live to tell of it.