> Mark Woodward wrote:
>> Shouldn't this work?
>> select ycis_id, min(tindex), avg(tindex) from y where ycis_id = 15;
>> ERROR:  column "y.ycis_id" must appear in the GROUP BY clause or be
>> used in an aggregate function
> This would require a great deal of special-casing, in particular
> knowledge of the = operator, and then the restriction to a particular
> form of the WHERE clause.  For overall consistency, I don't think this
> should be allowed.

Well, this started out as a "huh, that's funny, that should work, is that
a bug?" and is turning into a search through the SQL99 spec for a clear
answer. I've already worked around it, but to me, at least, it seems it
should work.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not

Reply via email to