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 CC203D1CCB9 for ; Mon, 8 Mar 2004 16:30:48 +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 42676-06 for ; Mon, 8 Mar 2004 12:30:38 -0400 (AST) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 592B0D1C9C4 for ; Mon, 8 Mar 2004 12:30:37 -0400 (AST) Received: (qmail 24073 invoked by uid 500); 8 Mar 2004 16:33:20 -0000 Date: Mon, 8 Mar 2004 10:33:20 -0600 From: Bruno Wolff III To: pgsql-performance@postgresql.org Subject: Re: Using bigint needs explicit cast to use the index Message-ID: <20040308163320.GA32497@wolff.to> Mail-Followup-To: pgsql-performance@postgresql.org References: <001101c404a3$fb34d320$fd08a8c0@steve> <20040308160525.GA25077@phlogiston.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040308160525.GA25077@phlogiston.dyndns.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/100 X-Sequence-Number: 5956 On Mon, Mar 08, 2004 at 11:05:25 -0500, Andrew Sullivan wrote: > > "Intended", no. "Expected", yes. This topic has had the best > Postgres minds work on it, and so far nobody's come up with a > solution. There was a proposal to put in a special-case automatic > fix for int4/int8 in 7.4, but I don't know whether it made it in. This is handled better in 7.5. Instead of doing things deciding what types of type conversion to do, a check is make for cross type conversion functions that could be used for an index scan. This is a general solution that doesn't result in unexpected type conversions.