X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7536DD1B510 for ; Mon, 27 Oct 2003 09:19:27 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 14415-06 for ; Mon, 27 Oct 2003 05:18:58 -0400 (AST) Received: from bob.samurai.com (bob.samurai.com [205.207.28.75]) by svr1.postgresql.org (Postfix) with ESMTP id 5EAFDD1B522 for ; Mon, 27 Oct 2003 05:18:56 -0400 (AST) Received: from 6-allhosts (d226-89-59.home.cgocable.net [24.226.89.59]) by bob.samurai.com (Postfix) with ESMTP id 646BD1F99; Mon, 27 Oct 2003 04:18:57 -0500 (EST) Subject: Re: explicit casting required for index use From: Neil Conway To: Reece Hart Cc: "pgsql-performance@postgresql.org" In-Reply-To: <1067104140.16297.125.camel@tallac> References: <1067104140.16297.125.camel@tallac> Content-Type: text/plain Message-Id: <1067246333.457.12.camel@tokyo> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 27 Oct 2003 04:18:53 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/666 X-Sequence-Number: 4414 On Sat, 2003-10-25 at 13:49, Reece Hart wrote: > Having to explicitly cast criterion is very non-intuitive. Moreover, > it seems quite straightforward that PostgreSQL might incorporate casts This is a well-known issue with the query optimizer -- search the mailing list archives for lots more information. The executive summary is that this is NOT a trivial issue to fix, and it hasn't been fixed in 7.4, but there is some speculation on how to fix it at some point in the future. -Neil