X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CA51B488971 for ; Tue, 4 Mar 2003 23:30:39 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 67477-01 for ; Tue, 4 Mar 2003 23:30:37 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id D9C71476E03 for ; Tue, 4 Mar 2003 17:33:22 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.8/8.12.8) with ESMTP id h24MXLx6008865; Tue, 4 Mar 2003 17:33:21 -0500 (EST) To: Greg Stark Cc: Jean-Luc Lachance , josh@agliodbs.com, Michael Nachbaur , pgsql-sql@postgresql.org Subject: Re: Forcing query to use an index In-reply-to: <87r89mki4w.fsf@stark.dyndns.tv> References: <9959CFC2-4DC7-11D7-90E0-000A27935D5A@nachbaur.com> <200303031532.47899.josh@agliodbs.com> <87d6l8hr18.fsf@stark.dyndns.tv> <3E650416.26C51435@nsd.ca> <87r89mki4w.fsf@stark.dyndns.tv> Comments: In-reply-to Greg Stark message dated "04 Mar 2003 15:10:23 -0500" Date: Tue, 04 Mar 2003 17:33:20 -0500 Message-ID: <8864.1046817200@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/142 X-Sequence-Number: 12182 Greg Stark writes: > I admit using 9999-01-01 as a date gives me the willies. But it does match > with the way the field is used and it produces nice clean index range > lookups. If you're willing to switch to type 'timestamp' then you could use the special value 'infinity' (or '-infinity' when you need it to sort before instead of after normal times). There was some talk awhile back of making type 'date' support infinity as well. This'd cost one day at each end of the allowable range, which doesn't seem like a big loss. But no one's done the legwork. regards, tom lane