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

Re: Window function bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Window function bug
Date: 2011-07-12 15:20:39
Message-ID: 12936.1310484039@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
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?

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Alvaro HerreraDate: 2011-07-12 15:25:16
Subject: Re: Window function bug
Previous:From: Kevin GrittnerDate: 2011-07-12 14:57:00
Subject: Re: BUG #6114: Bad path

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