Re: Remove dependence on integer wrapping - Mailing list pgsql-hackers

From Joseph Koshakow
Subject Re: Remove dependence on integer wrapping
Date
Msg-id CAAvxfHd22ujbY6uTraE+ZSTUN0xX0G-=NZcr0YnKSQuXthcM+g@mail.gmail.com
Whole thread Raw
In response to Re: Remove dependence on integer wrapping  (Joseph Koshakow <koshy44@gmail.com>)
Responses Re: Remove dependence on integer wrapping
List pgsql-hackers
On Thu, Jun 13, 2024 at 12:00 AM Alexander Lakhin <exclusion@gmail.com> wrote:
>
> And one more with array...
> CREATE TABLE t (ia int[]);
> INSERT INTO t(ia[2147483647:2147483647]) VALUES ('{}');

I've added another patch, 0003, to resolve this wrap-around. In fact I
discovered a bug that the following statement is accepted and inserts
an empty array into the table.

    INSERT INTO t(ia[-2147483648:2147483647]) VALUES ('{}');

My patch resolves this bug as well.

The other patches, 0001 and 0002, are unchanged but have their version
number incremented.

As a reminder, 0001 is reviewed and waiting for v18 and a committer.
0002 and 0003 are unreviewed. So, I'm going to mark this as waiting for
a reviewer.

Thanks,
Joe Koshakow
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: XML test error on Arch Linux
Next
From: Heikki Linnakangas
Date:
Subject: Refactoring postmaster's code to cleanup after child exit