Re: Crosstab Question - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: Crosstab Question
Date
Msg-id 85DBC72E-DB89-4680-BA54-0BF92ACD1CF1@seespotcode.net
Whole thread Raw
In response to Crosstab Question  (David Blewett <david@dawninglight.net>)
List 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



Attachment

pgsql-general by date:

Previous
From: Scott Ribe
Date:
Subject: Re: Take your postgresSql on the road, and live to tell of it.
Next
From: Oleg Bartunov
Date:
Subject: Re: tsearch2: plainto_tsquery() with OR?