X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8C3D9D1B4EF for ; Mon, 15 Sep 2003 07:40:38 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 13816-05 for ; Mon, 15 Sep 2003 04:40:29 -0300 (ADT) Received: from smtp.pspl.co.in (unknown [202.54.11.65]) by svr1.postgresql.org (Postfix) with ESMTP id 1BB3FD1B4E5 for ; Mon, 15 Sep 2003 04:40:26 -0300 (ADT) Received: (from root@localhost) by smtp.pspl.co.in (8.12.9/8.12.9) id h8F7o1M6023053 for ; Mon, 15 Sep 2003 13:20:01 +0530 Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) (authenticated bits=0) by persistent.co.in (8.12.9/8.12.9) with ESMTP id h8F7o0sv023036 for ; Mon, 15 Sep 2003 13:20:00 +0530 From: "Shridhar Daithankar" To: pgsql-performance@postgresql.org Date: Mon, 15 Sep 2003 13:12:28 +0530 MIME-Version: 1.0 Subject: Re: Attempt at work around of int4 query won't touch int8 index ... Reply-To: shridhar_daithankar@persistent.co.in Message-ID: <3F65BABC.32672.38837688@localhost> In-reply-to: <20901.1063248257@sss.pgh.pa.us> References: <2756862E-E3F5-11D7-8513-000A9566A412@socialserve.com> X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/215 X-Sequence-Number: 3581 On 10 Sep 2003 at 22:44, Tom Lane wrote: > James Robinson writes: > > Is this just a dead end, or is there some variation of this that might > > possibly work, so that ultimately an undoctored literal number, when > > applied to an int8 column, could find an index? > > I think it's a dead end. What I was playing with this afternoon was > removing the int8-and-int4 comparison operators from pg_operator. > It works as far as making "int8col = 42" do the right thing, but I'm > not sure yet about side-effects. Is it possible to follow data type upgrade model in planner? Something like in C/C++ where data types are promoted upwards to find out better plan? int2->int4->int8->float4->float8 types. That could be a clean solution.. just a thought.. Bye Shridhar -- Hlade's Law: If you have a difficult task, give it to a lazy person -- they will find an easier way to do it.