Re: [HACKERS] Re: type coersion (was OR clause status)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Re: type coersion (was OR clause status)
Дата
Msg-id 4596.902703965@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: type coersion (was OR clause status)  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
Ответы Re: [HACKERS] Re: type coersion (was OR clause status)
Список pgsql-hackers
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu> writes:
> So far, I haven't seen cases where the parser has tried to do "the wrong
> thing", only cases where "the right thing" causes the index handling to
> miss the boat...

I disagree, actually.  In the example

    select ... where i2 = 400;

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.

            regards, tom lane

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] thread-safe libpq and DBD::Pg
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Re: type coersion (was OR clause status)