With a sample query such as
SELECT x, avg(x)
FROM (VALUES (1), (2), (3)) AS v (x);
We give the error message "column "v.x" must appear in the GROUP BY
clause or be used in an aggregate function".
This is correct but incomplete. Attached is a trivial patch to also
suggest that the user might have been trying to use a window function.
--
Vik Fearing +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support