Aggregate error message - Mailing list pgsql-hackers

From Vik Fearing
Subject Aggregate error message
Date
Msg-id db1e36e8-1803-ed69-6d61-a04346a3cbff@2ndquadrant.com
Whole thread Raw
Responses Re: Aggregate error message  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Should we warn against using too many partitions?
Next
From: David Rowley
Date:
Subject: Re: Aggregate error message