Re: [SQL] Finding the "most recent" rows
От | Tom Lane |
---|---|
Тема | Re: [SQL] Finding the "most recent" rows |
Дата | |
Msg-id | 21809.924883569@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [SQL] Finding the "most recent" rows (Chris Bitmead <chris.bitmead@bigfoot.com>) |
Ответы |
Re: [HACKERS] Re: [SQL] Finding the "most recent" rows
|
Список | pgsql-sql |
Chris Bitmead <chris.bitmead@bigfoot.com> writes: >>>>>>> select title, summary, time from story t where time = (select >>>>>>> max(s.time) from story s GROUP BY s.title); >> >>>> Why doesn't replacing "=" with "IN" produce a result? It wouldn't be the >>>> desired result, but I thought this was legal. >> >> I thought so too (on both counts). Are you saying it doesn't work? >> What happens? Which version are you using? > httpd=> select title, summary, time from story t where time IN (select > max(s.time) from story s GROUP BY s.title); > ERROR: parser: Subselect has too many or too few fields. > I'm using postgresql-snap-990329.tgz Yeah, I see it too. This looks like a definite bug to me, but I have other bugs to squash right now :-(. Anyone else want to jump on this? regards, tom lane
В списке pgsql-sql по дате отправления: