pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chris Bitmead <chris.bitmead@bigfoot.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgreSQL.org>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [SQL] Finding the "most recent" rows
Date: Fri, 23 Apr 1999 12:06:09 -0400
Message-ID: <21809.924883569@sss.pgh.pa.us> (raw)
In-Reply-To: <371FF985.FA06E59B@bigfoot.com>

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



view thread (24+ messages)  latest in thread

Message-ID: <21809.924883569@sss.pgh.pa.us>
Permalink:  ../21809.924883569@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21809.924883569@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, chris.bitmead@bigfoot.com, pgsql-hackers@postgreSQL.org
  Subject: Re: [SQL] Finding the "most recent" rows
  In-Reply-To: <21809.924883569@sss.pgh.pa.us>
  References: <371FF985.FA06E59B@bigfoot.com> <21809.924883569@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox