Re: Aggregate error message

2019-05-24 Thread Tom Lane
David Rowley writes: > On Fri, 24 May 2019 at 18:17, Vik Fearing wrote: >> 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 cor

Re: Aggregate error message

2019-05-24 Thread David Rowley
On Fri, 24 May 2019 at 18:17, Vik Fearing wrote: > > 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.