On Mon, 11 Feb 2002 pgsql-bugs@postgresql.org wrote:
> Janko Richter (j.richter@wallstreet-develop.de) reports a bug with a severity of 2
> The lower the number the more severe it is.
>
> Short Description
> Optimizer uses seq scan only
You'll need to cast the value you're comparing with to int8
(12345::int8 or CAST(12345 as int8) should work).