Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id A17CEB5DBD5 for ; Tue, 12 Jul 2011 19:26:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 84464-02 for ; Tue, 12 Jul 2011 22:26:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id E1911B5DC56 for ; Tue, 12 Jul 2011 19:26:01 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p6CMPxs3018464; Tue, 12 Jul 2011 18:25:59 -0400 (EDT) To: Jeff Davis cc: pgsql-bugs@postgresql.org Subject: Re: Window function bug In-reply-to: <1310485990.3012.268.camel@jdavis> References: <1310431686.497.26.camel@jdavis-ux.asterdata.local> <12015.1310480904@sss.pgh.pa.us> <12936.1310484039@sss.pgh.pa.us> <1310485990.3012.268.camel@jdavis> Comments: In-reply-to Jeff Davis message dated "Tue, 12 Jul 2011 08:53:10 -0700" Date: Tue, 12 Jul 2011 18:25:59 -0400 Message-ID: <18463.1310509559@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201107/110 X-Sequence-Number: 30722 Jeff Davis writes: > On Tue, 2011-07-12 at 11:20 -0400, Tom Lane wrote: >> 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? > Agreed. I'm not worried about backpatching it. I've fixed this in HEAD and 9.1 only. regards, tom lane