On Mon, Jan 31, 2011 at 7:36 PM, Tom Lane wrote:
> Thom Brown 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)::int
On 3 February 2011 13:58, Thom Brown wrote:
> On 3 February 2011 13:32, Thom Brown wrote:
>> Actually, further testing indicates this causes other problems:
>>
>> postgres=# SELECT x FROM generate_series(1, 9,-1) AS a(x);
>> x
>> ---
>> 1
>> (1 row)
>>
>> Should return no rows.
>>
>> postgres=#
On 3 February 2011 14:37, David Johnston wrote:
> The proposed generate_series(1,9,-1) behavior seems unusual.
I haven't proposed this behaviour as it already occurs. I just
include it for testing to ensure no other part of generate series is
affected by such changes. Whether or not that is des
:58 AM
To: Alban Hertroys
Cc: Tom Lane; PGSQL Mailing List
Subject: Re: [GENERAL] Issues with generate_series using integer boundaries
On 3 February 2011 13:32, Thom Brown wrote:
> Actually, further testing indicates this causes other problems:
>
> postgres=# SELECT x FROM generate_series
On 3 February 2011 13:32, Thom Brown wrote:
> Actually, further testing indicates this causes other problems:
>
> postgres=# SELECT x FROM generate_series(1, 9,-1) AS a(x);
> x
> ---
> 1
> (1 row)
>
> Should return no rows.
>
> postgres=# SELECT x FROM generate_series(1, 9,3) AS a(x);
> x
> ---
On 3 February 2011 11:34, Thom Brown wrote:
> On 3 February 2011 11:31, Thom Brown wrote:
>> On 1 February 2011 23:08, Thom Brown wrote:
>>> On 1 February 2011 21:32, Alban Hertroys
>>> wrote:
On 1 Feb 2011, at 21:26, Thom Brown wrote:
> On 1 February 2011 01:05, Tom Lane wrote:
On 3 February 2011 11:31, Thom Brown wrote:
> On 1 February 2011 23:08, Thom Brown wrote:
>> On 1 February 2011 21:32, Alban Hertroys
>> wrote:
>>> On 1 Feb 2011, at 21:26, Thom Brown wrote:
>>>
On 1 February 2011 01:05, Tom Lane wrote:
> Thom Brown writes:
>> I've noticed that if
On 1 February 2011 23:08, Thom Brown wrote:
> On 1 February 2011 21:32, Alban Hertroys
> wrote:
>> On 1 Feb 2011, at 21:26, Thom Brown wrote:
>>
>>> On 1 February 2011 01:05, Tom Lane wrote:
Thom Brown writes:
> I've noticed that if I try to use generate_series to include the upper
>>>
On 1 February 2011 21:32, Alban Hertroys
wrote:
> On 1 Feb 2011, at 21:26, Thom Brown wrote:
>
>> On 1 February 2011 01:05, Tom Lane wrote:
>>> Thom Brown 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
On 1 Feb 2011, at 21:26, Thom Brown wrote:
> On 1 February 2011 01:05, Tom Lane wrote:
>> Thom Brown 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
>
On 1 February 2011 01:05, Tom Lane wrote:
> Thom Brown 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 ove
On 1 February 2011 01:05, Tom Lane wrote:
> Thom Brown 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 ove
Thom Brown 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 a
On 1 February 2011 00:41, Thom Brown wrote:
> On 1 February 2011 00:36, Tom Lane wrote:
>> Thom Brown 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 everyth
On 1 February 2011 00:36, Tom Lane wrote:
> Thom Brown 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.
Thom Brown 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.
regards, tom lane
--
Sen
On 1 February 2011 00:15, Thom Brown wrote:
> Hi,
>
> I've noticed that if I try to use generate_series to include the upper
> boundary of int4, it never returns:
>
> SELECT x FROM generate_series(2147483643::int4, 2147483647::int4) AS a(x);
>
> But the same query with int8 returns instantly:
>
>
17 matches
Mail list logo