Comment Re:I like MySQL, but... (Score 1) 419
The reason for this problem is that the query planner did not use an index on a bigint column when the 123 literal in the query was an int literal, so id did an sequential scan instead of an index scan.
But this problem is well-known with well-known workarounds, and fixed since 8.0.
Another workaround is using
select * from tbl where id = 123::bigint
For a full list of postgresql (and mysql) gotchas, see http://sql-info.de/