Re: How to use index in WHERE int = float

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrus" <kobruleht2(at)hot(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to use index in WHERE int = float
Date: 2008-11-09 22:22:39
Message-ID: 7423.1226269359@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andrus" <kobruleht2(at)hot(dot)ee> writes:
>> The IN-pullup code runs before constant-simplification does, so it
>> doesn't see that as a simple join condition.

> Seems serious design flaw.
> How to change expression parser so that contant parts of expressions are
> removed before IN-pullup?

It would be far simpler to fix your query generator to not emit the
useless "0 or".

Even if we made the planner deal with that, the number of cycles it
would expend to recover from the generator's stupidity would be several
orders of magnitude higher than the number of cycles needed to not be so
stupid.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Blazej 2008-11-10 04:24:03 Re: Chart of Accounts
Previous Message Nikolay Samokhvalov 2008-11-09 21:14:34 Re: again...