Re: BUG #2006: queryoptimizer and comparing a primary key of biginteger and a literal

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2006: queryoptimizer and comparing a primary key of biginteger and a literal
Дата
Msg-id 2526.1130515940@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #2006: queryoptimizer and comparing a primary key of biginteger and a literal  ("Atanas Hristov" <atanashristov@hotmail.com>)
Список pgsql-bugs
"Atanas Hristov" <atanashristov@hotmail.com> writes:
> foo=# EXPLAIN ANALYZE SELECT 'foo' FROM foo WHERE id = 0; -- WHY POSTGRES
> DOES NOT IMPLICITLY DO CASTING OF THE LITERAL "0" ??????

It works for me:

regression=# EXPLAIN ANALYZE SELECT 'foo' FROM foo WHERE id = 0;
                                                 QUERY PLAN
------------------------------------------------------------------------------------------------------------
 Index Scan using foo_pk on foo  (cost=0.00..4.82 rows=1 width=0) (actual time=0.241..0.241 rows=0 loops=1)
   Index Cond: (id = 0)
 Total runtime: 0.456 ms
(3 rows)

I don't think you're really testing 8.1.  Try "select version()"

            regards, tom lane

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

Предыдущее
От: "Henning"
Дата:
Сообщение: BUG #2004: SQL_COLUMN_AUTO_INCREMENT & SQL_DESC_AUTO_UNIQUE_VALUE not working
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: BUG #2006: queryoptimizer and comparing a primary key