Search Postgresql Archives

Re: Issues with generate_series using integer boundaries

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

 



On 1 February 2011 00:41, Thom Brown <thom@xxxxxxxxx> wrote:
> On 1 February 2011 00:36, 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.
>
> D'oh.  You explained this to me before.  This time I'll endeavour to
> remember it.  At least that explains the problem I created for myself
> with lower boundaries.

Okay, so lower boundaries are still affected in the same way as upper
boundaries after all, at least when using a reverse series:

SELECT x FROM generate_series((-2147483644)::int4,
(-2147483648)::int4, -1) AS a(x);

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[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