Re: Window function bug

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Window function bug
Date: 2011-07-12 15:25:16
Message-ID: 1310484282-sup-7290@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Excerpts from Tom Lane's message of mar jul 12 11:20:39 -0400 2011:
> I wrote:
> > ... so I guess the answer is that this code ought to avoid adding Vars that
> > are only mentioned within aggregates.
>
> The cleanest way to fix this would involve adding another flag parameter
> to flatten_tlist and pull_var_clause. This is no problem to do in HEAD
> or even 9.1, but I'm a bit worried about breaking third-party code if we
> backpatch further than that. So far as I can see, the failure only
> occurs if we have a plain (non-grouping) Agg node, which implies that
> the user is trying to use windowing functions on a result set that's
> guaranteed to contain exactly one aggregated row. That seems pretty
> useless, so I'm thinking it's not worth back-patching a fix for.
> Comments?

Since there have been no previous bug reports on this, it seems clear
that a backpatch is not strictly necessary either.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Davis 2011-07-12 15:53:10 Re: Window function bug
Previous Message Tom Lane 2011-07-12 15:20:39 Re: Window function bug