Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id DB66A102CB13 for ; Thu, 26 Jan 2012 21:43:21 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RqaqV-00067X-7W for pgsql-bugs@postgresql.org; Fri, 27 Jan 2012 01:43:21 +0000 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 q0R1h4WI016537; Thu, 26 Jan 2012 20:43:04 -0500 (EST) To: Jeff Davis cc: pgsql-bugs@postgresql.org Subject: Re: 8.4, 9.0 bug (doesn't exist in 9.1) related to window functions In-reply-to: <1327622791.14650.8.camel@sussancws0025> References: <1327622791.14650.8.camel@sussancws0025> Comments: In-reply-to Jeff Davis message dated "Thu, 26 Jan 2012 16:06:31 -0800" Date: Thu, 26 Jan 2012 20:43:04 -0500 Message-ID: <16536.1327628584@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/185 X-Sequence-Number: 32252 Jeff Davis writes: > In REL8_4_STABLE and REL9_0_STABLE: > => select ntile(3) OVER ( ORDER BY CASE WHEN count(i) = 0 THEN NULL ELSE > count(i) END asc ) from ( SELECT NULL::integer as i limit 0 ) s ; > ERROR: cannot extract attribute from empty tuple slot I believe this is the same case fixed here: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=c1d9579dd and as noted in that commit message, it didn't appear worth the risk of fixing it in released branches. regards, tom lane