On Sat, Sep 03, 2005 at 04:29:25PM -0400, Allan Wang wrote: > I'm using 8.1 from CVS head of about two days ago. > > Extra columns seem to be on sum(plays.length), videos.path, videoid
Here's a simplified, complete test case: CREATE TABLE foo ( x integer, y integer ); INSERT INTO foo (x, y) VALUES (1, 2); SELECT * FROM (SELECT sum(x), (SELECT y) AS yy FROM foo GROUP BY y) AS s LIMIT 1; sum | yy | -----+----+--- 1 | 2 | 2 (1 row) SELECT * FROM (SELECT sum(x), (SELECT y) AS yy FROM foo GROUP BY yy) AS s LIMIT 1; sum | yy -----+---- 1 | 2 (1 row) SELECT * FROM (SELECT sum(x), (SELECT y) AS yy FROM foo GROUP BY y) AS s; sum | yy -----+---- 1 | 2 (1 row) SELECT * FROM (SELECT sum(x), y AS yy FROM foo GROUP BY y) AS s LIMIT 1; sum | yy -----+---- 1 | 2 (1 row) SELECT * FROM (SELECT x, (SELECT y) AS yy FROM foo) AS s LIMIT 1; x | yy ---+---- 1 | 2 (1 row) -- Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly