"Atanas Hristov" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to