Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 83C969F9F49 for ; Tue, 12 Dec 2006 11:01:15 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 27671-06 for ; Tue, 12 Dec 2006 11:00:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id BC1CB9F9398 for ; Tue, 12 Dec 2006 11:01:01 -0400 (AST) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 56AB476FD4; Tue, 12 Dec 2006 15:00:56 +0000 (GMT) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id ABB46FF04; Tue, 12 Dec 2006 15:00:55 +0000 (GMT) Message-ID: <457EC53B.2070600@archonet.com> Date: Tue, 12 Dec 2006 15:05:31 +0000 From: Richard Huxton User-Agent: Thunderbird 1.5.0.8 (X11/20061115) MIME-Version: 1.0 To: Cronje Fourie Cc: pgsql-sql@postgresql.org Subject: Re: TPCH Benchmark query result invalid References: <1165932562.10968.1.camel@localhost> In-Reply-To: <1165932562.10968.1.camel@localhost> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/91 X-Sequence-Number: 27047 Cronje Fourie wrote: > When running the following query against a TPCH db I get 0 results > returned > and o_orderdate < date '1993-07-01' + interval '3' month That's the problem line. richardh=# SELECT interval '3' month; interval ---------- 00:00:00 (1 row) It's got a zero-length date-range it's comparing against. If you have interval '3 months' that should work, but I'm afraid I haven't got time to check against the specs to see what the correct format should be. -- Richard Huxton Archonet Ltd