--- a/contrib/intarray/sql/_int.sql	2026-10-17 21:15:02.494272800 -0300
+++ b/contrib/intarray/sql/_int.sql	2026-10-17 21:19:40.670412273 -0300
@@ -78,6 +78,9 @@
 -- Leading zeros do not make an octal number.
 SELECT '010'::query_int;
 SELECT '{10}'::int[] @@ '010'::query_int;
+SELECT '08'::query_int, '-010'::query_int, '!(010|09)'::query_int;
+SELECT '02147483647'::query_int;
+SELECT '017777777777'::query_int;
 
 -- Test for overflow of the int16 "left" field in findoprnd().
 -- This query uses a balanced binary tree to avoid using too much stack.
--- a/contrib/intarray/expected/_int.out	2026-10-17 21:15:02.494206846 -0300
+++ b/contrib/intarray/expected/_int.out	2026-10-17 21:19:42.422411677 -0300
@@ -411,6 +411,22 @@
  t
 (1 row)
 
+SELECT '08'::query_int, '-010'::query_int, '!(010|09)'::query_int;
+ query_int | query_int |  query_int  
+-----------+-----------+-------------
+ 8         | -10       | !( 10 | 9 )
+(1 row)
+
+SELECT '02147483647'::query_int;
+ query_int  
+------------
+ 2147483647
+(1 row)
+
+SELECT '017777777777'::query_int;
+ERROR:  syntax error
+LINE 1: SELECT '017777777777'::query_int;
+               ^
 -- Test for overflow of the int16 "left" field in findoprnd().
 -- This query uses a balanced binary tree to avoid using too much stack.
 DO $$
