Re: [BUGS] 8.4, 9.0 bug (doesn't exist in 9.1) related to window functions

2012-01-26 Thread Jeff Davis
On Thu, 2012-01-26 at 20:43 -0500, Tom Lane wrote: > Jeff Davis writes: > > => 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

Re: [BUGS] 8.4, 9.0 bug (doesn't exist in 9.1) related to window functions

2012-01-26 Thread Tom Lane
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 h

[BUGS] 8.4, 9.0 bug (doesn't exist in 9.1) related to window functions

2012-01-26 Thread Jeff Davis
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 A different error appears in 9.1.0 ("could not find pathkey item t