Re: Crosstab question

From: Joe Conway <mail(at)joeconway(dot)com>
To: Adam Witney <awitney(at)sghms(dot)ac(dot)uk>
Cc: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Crosstab question
Date: 2003-10-20 19:51:42
Message-ID: 3F943CCE.5080800@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Adam Witney wrote:
> The missing values seemed to have been ignored and so the data is being
> shifted to the left and so put in the wrong columns.
>
> Am I using this function correctly? What is supposed to happen with missing
> values?

Yeah, that's a limitation of the version of crosstab distributed with
7.3. And (believe it or not) I've actually found cases where that
behavior is useful. There is another version of crosstab ("hashed"
crosstab) that treats missing values the way you expect. You can grab a
copy backported for 7.3 here:
http://www.joeconway.com/
You want the one that says: "contrib/tablefunc backported for PostgreSQL
7.3.x -- sync'd with CVS HEAD 02-Oct-2003"

HTH,

Joe

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ewald Geschwinde 2003-10-20 19:52:37 Re: [postgres] Deutsche PostgreSQL-Mailingliste unter postgresql.org
Previous Message Tom Lane 2003-10-20 19:50:00 Re: Which is faster SQL or PL/PGSQL