Skip site navigation (1) Skip section navigation (2)

Re: Issues with generate_series using integer boundaries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thom Brown <thom(at)linux(dot)com>
Cc: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Issues with generate_series using integer boundaries
Date: 2011-02-01 01:05:25
Message-ID: 12064.1296522325@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
Thom Brown <thom(at)linux(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2011-02-01 01:25:59
Subject: Re: pg_upgrade fails for non-postgres user
Previous:From: Thom BrownDate: 2011-02-01 00:48:13
Subject: Re: Issues with generate_series using integer boundaries

pgsql-general by date

Next:From: Thom BrownDate: 2011-02-01 02:17:17
Subject: Re: Issues with generate_series using integer boundaries
Previous:From: Aleksey TsalolikhinDate: 2011-02-01 00:54:38
Subject: Why does my DB size differ between Production and DR? (Postgres 8.4)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group