While doing some random testing, I noticed that the following is broken in HEAD:
SELECT COUNT(DISTINCT random()) FROM generate_series(1,10); ERROR: ORDER/GROUP BY expression not found in targetlist It appears to have been broken by 1349d279, though I haven't looked at the details. I'm somewhat surprised that a case as simple as this wasn't covered by any pre-existing regression tests. Regards, Dean