Re: Issues with generate_series using integer boundaries

From: Thom Brown <thom(at)linux(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Issues with generate_series using integer boundaries
Date: 2011-02-01 00:41:25
Message-ID: AANLkTikjPmYux5dH_U=cae8cgQ4c7d-69S86GuGJ57k5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 1 February 2011 00:36, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thom Brown <thom(at)linux(dot)com> 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.

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thom Brown 2011-02-01 00:48:13 Re: Issues with generate_series using integer boundaries
Previous Message Tom Lane 2011-02-01 00:36:42 Re: Issues with generate_series using integer boundaries

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2011-02-01 00:48:13 Re: Issues with generate_series using integer boundaries
Previous Message Tom Lane 2011-02-01 00:36:42 Re: Issues with generate_series using integer boundaries