Re: [HACKERS] Re: type coersion (was OR clause status) - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] Re: type coersion (was OR clause status)
Date
Msg-id 35CE5E64.F53809A1@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] Re: type coersion (was OR clause status)  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Re: type coersion (was OR clause status)
Re: [HACKERS] Re: type coersion (was OR clause status)
List pgsql-hackers
> > I claim the parser is doing the wrong thing by representing this as
> > "where int4(i2) = 400::int4" rather than "where i2 = 400::int2".
> > It is not really reasonable to expect the optimizer to clean up
> > after that initial mistake.
> I don't see that.

Yup. The parser is behaving as Bruce describes. The new type conversion
stuff isn't the fundamental problem. It's the original features in the
planner when trying to use indices.

> The problem is how do we use indexes for this?  I am still researching
> this.

OK, let me know if I can help look into anything. In the meantime, I'll
keep poking at it a bit...

                         - Tom

pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] How do I construct a varlena?
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: type coersion (was OR clause status)