pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: Window function bug
Date: Tue, 12 Jul 2011 11:25:16 -0400
Message-ID: <1310484282-sup-7290@alvh.no-ip.org> (raw)
In-Reply-To: <12936.1310484039@sss.pgh.pa.us>
References: <1310431686.497.26.camel@jdavis-ux.asterdata.local>
	<12015.1310480904@sss.pgh.pa.us>
	<12936.1310484039@sss.pgh.pa.us>

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@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (6+ messages)  latest in thread

Message-ID: <1310484282-sup-7290@alvh.no-ip.org>
Permalink:  ../1310484282-sup-7290@alvh.no-ip.org/
Also on:    postgresql.org/message-id/1310484282-sup-7290@alvh.no-ip.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@commandprompt.com, tgl@sss.pgh.pa.us, pgsql@j-davis.com
  Subject: Re: Window function bug
  In-Reply-To: <1310484282-sup-7290@alvh.no-ip.org>
  References: <1310431686.497.26.camel@jdavis-ux.asterdata.local> <12015.1310480904@sss.pgh.pa.us> <12936.1310484039@sss.pgh.pa.us> <1310484282-sup-7290@alvh.no-ip.org>

* 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