Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [206.210.65.6]) by hub.org (8.9.2/8.9.1) with ESMTP id TAA89251 for ; Tue, 13 Apr 1999 19:32:22 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id TAA00465; Tue, 13 Apr 1999 19:31:12 -0400 (EDT) To: Walt Bigelow cc: pgsql-sql@hub.org Subject: Re: [SQL] subqueries In-reply-to: Your message of Tue, 13 Apr 1999 13:12:34 +0000 (Local time zone must be set--see zic manual page) Date: Tue, 13 Apr 1999 19:31:11 -0400 Message-ID: <463.924046271@sss.pgh.pa.us> From: Tom Lane Walt Bigelow writes: > On Tue, 13 Apr 1999, Tom Lane wrote: >>>> This query returns 0 rows [ when it shouldn't ]. > The output of explain: > NOTICE: QUERY PLAN: > Seq Scan on tbladdress (cost=50.34 size=348 width=24) > SubPlan > -> Unique (cost=50.34 size=0 width=0) > -> Sort (cost=50.34 size=0 width=0) > -> Seq Scan on tbladdress (cost=50.34 size=348 width=4) That looks about like what I'd expect (although I suppose you left off the ORDER BY clause when doing the EXPLAIN? With it, there should be a top-level Sort node). I'm not able to duplicate your problem here on a toy table, using either 6.4.2 or 6.5-current. Perhaps there is some platform dependency involved. Can anyone else try it? regards, tom lane