On Wed, Jul 17, 2024 at 9:23 AM Joseph Koshakow <kosh...@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.