From: | Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Aggregate error message |
Date: | 2019-05-24 06:17:12 |
Message-ID: | db1e36e8-1803-ed69-6d61-a04346a3cbff@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
or_window.diff | text/x-patch | 744 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2019-05-24 07:20:35 | Re: Aggregate error message |
Previous Message | Amit Langote | 2019-05-24 05:57:54 | Re: Should we warn against using too many partitions? |