Re: Remove dependence on integer wrapping
От | jian he |
---|---|
Тема | Re: Remove dependence on integer wrapping |
Дата | |
Msg-id | CACJufxFkTACY6MprpewMncdOpL9dpZBcAGtc6WLfnScLknS3DA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Remove dependence on integer wrapping (Joseph Koshakow <koshy44@gmail.com>) |
Ответы |
Re: Remove dependence on integer wrapping
|
Список | pgsql-hackers |
On Wed, Jul 17, 2024 at 9:23 AM Joseph Koshakow <koshy44@gmail.com> wrote: > > Updated in the attached patch. > > Once again, the other patches, 0001, 0003, and 0004 are unchanged but > have their version number incremented. > +-- Test for overflow in array slicing +CREATE temp table arroverflowtest (i int[]); +INSERT INTO arroverflowtest(i[-2147483648:2147483647]) VALUES ('{}'); +INSERT INTO arroverflowtest(i[1:2147483647]) VALUES ('{}'); +INSERT INTO arroverflowtest(i[2147483647:2147483647]) VALUES ('{}'); +INSERT INTO arroverflowtest(i[2147483647:2147483647]) VALUES ('{}'); this example, master error is ERROR: source array too small your patch error is ERROR: array size exceeds the maximum allowed (134217727) INSERT INTO arroverflowtest(i[2147483647:2147483647]) VALUES ('{1}'); master: ERROR: array lower bound is too large: 2147483647 you patch ERROR: array size exceeds the maximum allowed (134217727) i think "INSERT INTO arroverflowtest(i[2147483647:2147483647]) VALUES ('{}');" means to insert one element (size) to a customized lower/upper bounds.
В списке pgsql-hackers по дате отправления: