Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] Crosstab Problems

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jorge Godoy <jgodoy(at)gmail(dot)com>, scott(dot)marlowe(at)gmail(dot)com, Stefan Schwarzer <stefan(dot)schwarzer(at)grid(dot)unep(dot)ch>, regmeplease(at)gmail(dot)com, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [GENERAL] Crosstab Problems
Date: 2007-10-25 22:36:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-patches
Tom Lane wrote:
> Joe Conway <mail(at)joeconway(dot)com> writes:
>> Tom Lane wrote:
>>> 1. Treat NULL rowid as a category in its own right.  This would conform
>>> with the behavior of GROUP BY and DISTINCT, for instance.
>> In any case, the attached changes the behavior to #1 for both flavors of 
>> crosstab (the original crosstab(text, int) and the usually more useful 
>> crosstab(text, text)).
>> It is appropriate for 8.3 but not back-patching as it changes behavior 
>> in a non-backward compatible way and is probably too invasive anyway. 
> Um, if the previous code crashed in this case, why would you worry about
> being backward-compatible with it?  You're effectively changing the
> behavior anyway, so you might as well make it do what you've decided is
> the right thing.

Well, maybe the attached patches better explain what I mean.

In the case of the 8.2 patch, a very small code change allows new 
regression data including NULL rowids to:

   1) not crash
   2) have no impact otherwise

The much bigger 8.3 patch shows that for the very same new regression 
data, there is a significant impact on the output (i.e. NULL rowids get 
their own output row as discussed).

I'm still leaning toward applying the 8.2 patch for back branches but 
I'll bow to the general consensus.


Attachment: tablefunc.head.diff
Description: text/x-patch (24.2 KB)
Attachment: tablefunc.8.2.diff
Description: text/x-patch (3.5 KB)

In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2007-10-26 00:38:42
Subject: Re: Autovacuum cancellation
Previous:From: Gregory StarkDate: 2007-10-25 22:28:39
Subject: Re: Autovacuum cancellation

pgsql-general by date

Next:From: Ralph SmithDate: 2007-10-25 22:36:37
Subject: Re: 2 versions running & using pg_dumpall
Previous:From: Eva ElizaldeDate: 2007-10-25 22:35:05
Subject: sql

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group