Tom Lane wrote:
>
> Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com> writes:
> > Clever. But why doesn't this work....
>
> > select title, summary, time from story t where time = (select
> > max(s.time) from story s GROUP BY s.title);
> > ERROR: parser: Subselect has too many or too few fields.
>
> A subselect used in an expression has to return exactly one value;
> yours will return as many tuples as there are distinct titles.
Why doesn't replacing "=" with "IN" produce a result? It wouldn't be the
desired result, but I thought this was legal.