X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8B40B52809 for ; Wed, 6 Jul 2005 21:18:28 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 17899-03 for ; Thu, 7 Jul 2005 00:18:19 +0000 (GMT) Received: from quasar.skima.is (quasar.skima.is [212.30.200.205]) by svr1.postgresql.org (Postfix) with ESMTP id AEB63529CB for ; Wed, 6 Jul 2005 21:18:17 -0300 (ADT) Received: from gnari ([85.220.23.119] [85.220.23.119]) by quasar.skima.is with ESMTP; Thu, 7 Jul 2005 00:18:19 Z Subject: Re: left joins From: Ragnar =?ISO-8859-1?Q?Hafsta=F0?= To: pgsql-sql@postgresql.org In-Reply-To: <20050706103303.3C2C424E7A4@smtp.nildram.co.uk> References: <20050706103303.3C2C424E7A4@smtp.nildram.co.uk> Content-Type: text/plain Date: Thu, 07 Jul 2005 00:19:17 +0000 Message-Id: <1120695557.14290.22.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/37 X-Sequence-Number: 22015 On Wed, 2005-07-06 at 11:33 +0100, Nick Stone wrote: > I've had exactly yhe same problem - try changing the query to. > > select count(*) > from h left join p using (r,pos) and p.r_order=1 > where h.tn > 20 > and h.tn < 30 really ? is this legal SQL ? is this a 8.0 feature ? I get syntax error at or near "and" at character 41 gnari