Re: BUG #14205: Weird cast long int values to numeric leading to seq scan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: maxim(dot)boguk(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14205: Weird cast long int values to numeric leading to seq scan
Date: 2016-06-21 14:49:40
Message-ID: 10149.1466520580@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

maxim(dot)boguk(at)gmail(dot)com writes:
> If an input value of the field=value goes over bigint range, the database
> switches to the field::numeric=value::numeric plan, which leads to the seq
> scan as result.

This is not a bug. If you want to force inputs to be bigint, try using a
cast.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Thomas 2016-06-21 17:00:47 Re: BUG #14203: pgindent requires pg_bsd_indent 1.2, but only 1.3 available for download
Previous Message maxim.boguk 2016-06-21 14:42:00 BUG #14205: Weird cast long int values to numeric leading to seq scan