Search Postgresql Archives

Re: Issues with generate_series using integer boundaries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 31, 2011 at 7:36 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
Thom Brown <thom@xxxxxxxxx> writes:
> Actually, those lower bound errors aren't related to generate_series,
> but I'd still like to know why -2147483648::int4 is out of range.

:: binds tighter than - (and everything else too). ÂWrite
(-2147483648)::int4 instead.

That's surprising enough that it might be worth generating a warning if the typecasting operator is used on a mathmatical _expression_--"a - b::int4"--rather than a single value (eg. "(a - b)::int4" or "f()::int4"). I don't know the grammar to know if that fits.

--
Glenn Maynard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux