Re: Issues with generate_series using integer boundaries - Mailing list pgsql-general

From Tom Lane
Subject Re: Issues with generate_series using integer boundaries
Date
Msg-id 12064.1296522325@sss.pgh.pa.us
Whole thread Raw
In response to Issues with generate_series using integer boundaries  (Thom Brown <thom@linux.com>)
Responses Re: Issues with generate_series using integer boundaries  (Thom Brown <thom@linux.com>)
List pgsql-general
Thom Brown <thom@linux.com> writes:
> I've noticed that if I try to use generate_series to include the upper
> boundary of int4, it never returns:

I'll bet it's testing "currval > bound" without considering the
possibility that incrementing currval caused an overflow wraparound.
We fixed a similar problem years ago in plpgsql FOR-loops...

            regards, tom lane

pgsql-general by date:

Previous
From: Aleksey Tsalolikhin
Date:
Subject: Why does my DB size differ between Production and DR? (Postgres 8.4)
Next
From: Thom Brown
Date:
Subject: Re: Issues with generate_series using integer boundaries