"Atanas Hristov" <atanashristov(at)hotmail(dot)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