Re: Surprising sequence scan when function call used

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Surprising sequence scan when function call used
Дата
Msg-id 4164.972530576@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Surprising sequence scan when function call used  ("Will Fitzgerald" <fitzgerald@inetmi.com>)
Список pgsql-sql
"Will Fitzgerald" <fitzgerald@inetmi.com> writes:
> vdsq=> explain select * from login where login.login = lower('foo');

> Seq Scan on login  (cost=0.00..1361.86 rows=609 width=62)

7.0 is a little bit stupid about cross-data-type comparisons (lower()
yields text, not char(n)).  This example works OK in current sources,
but until 7.1 comes out you'll need to write something likewhere login.login = lower('foo')::char;
Or change the login field to type text...
        regards, tom lane


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

Предыдущее
От: "Shane McEneaney"
Дата:
Сообщение: How to Return number of rows updated in stored procedure
Следующее
От: indraneel@www.cdfd.org.in
Дата:
Сообщение: Re: Alternate Database Locations