From: Joe Conway <mail@joeconway.com>
To: Adam Witney <awitney@sghms.ac.uk>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Crosstab question
Date: Mon, 20 Oct 2003 12:51:42 -0700
Message-ID: <3F943CCE.5080800@joeconway.com> (raw)
In-Reply-To: <BBB9EABA.26A4A%awitney@sghms.ac.uk>
References: <BBB9EABA.26A4A%awitney@sghms.ac.uk>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mail@joeconway.com, awitney@sghms.ac.uk
Subject: Re: Crosstab question
In-Reply-To: <3F943CCE.5080800@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox