diff --git a/contrib/cube/expected/cube.out b/contrib/cube/expected/cube.out
index 57dbc56c711c5022316148b383f4e70c38f29e02..4b20b400bdf723fae753c03376e6aeb9b48987fb 100644
--- a/contrib/cube/expected/cube.out
+++ b/contrib/cube/expected/cube.out
@@ -5,12 +5,9 @@
 -- first, define the datatype.  Turn off echoing so that expected file
 -- does not depend on contents of cube.sql.
 --
+SET client_min_messages = warning;
 \set ECHO none
-psql:cube.sql:10: NOTICE:  type "cube" is not yet defined
-DETAIL:  Creating a shell type definition.
-psql:cube.sql:14: NOTICE:  return type cube is only a shell
-psql:cube.sql:18: NOTICE:  return type cube is only a shell
-psql:cube.sql:23: NOTICE:  argument type cube is only a shell
+RESET client_min_messages;
 --
 -- testing the input and output functions
 --
diff --git a/contrib/cube/expected/cube_1.out b/contrib/cube/expected/cube_1.out
index 0f92f58be22b96e205e854fc11d02b32a0bed730..e935fd281b7003d129911a05214615d4e977be9d 100644
--- a/contrib/cube/expected/cube_1.out
+++ b/contrib/cube/expected/cube_1.out
@@ -5,10 +5,9 @@
 -- first, define the datatype.  Turn off echoing so that expected file
 -- does not depend on contents of cube.sql.
 --
+SET client_min_messages = warning;
 \set ECHO none
-psql:cube.sql:10: NOTICE:  type "cube" is not yet defined
-DETAIL:  Creating a shell type definition.
-psql:cube.sql:15: NOTICE:  argument type cube is only a shell
+RESET client_min_messages;
 --
 -- testing the input and output functions
 --
@@ -395,6 +394,37 @@ SELECT '(0)'::text::cube;
  (0)
 (1 row)
 
+--
+-- Test the float[] -> cube cast
+--
+SELECT cube('{0,1,2}'::float[], '{3,4,5}'::float[]);
+        cube         
+---------------------
+ (0, 1, 2),(3, 4, 5)
+(1 row)
+
+SELECT cube('{0,1,2}'::float[], '{3}'::float[]);
+ERROR:  UR and LL arrays must be of same length
+SELECT cube(NULL::float[], '{3}'::float[]);
+ cube 
+------
+ 
+(1 row)
+
+SELECT cube('{0,1,2}'::float[]);
+   cube    
+-----------
+ (0, 1, 2)
+(1 row)
+
+SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]); 
+        cube_subset        
+---------------------------
+ (5, 3, 1, 1),(8, 7, 6, 6)
+(1 row)
+
+SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]); 
+ERROR:  Index out of bounds
 --
 -- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
 --
@@ -1021,24 +1051,24 @@ SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
 CREATE TABLE test_cube (c cube);
 \copy test_cube from 'data/test_cube.data'
 CREATE INDEX test_cube_ix ON test_cube USING gist (c);
-SELECT * FROM test_cube	WHERE c && '(3000,1000),(0,0)';
+SELECT * FROM test_cube	WHERE c && '(3000,1000),(0,0)' ORDER BY c;
             c             
 --------------------------
- (2424, 160),(2424, 81)
- (759, 187),(662, 163)
- (1444, 403),(1346, 344)
- (337, 455),(240, 359)
  (1594, 1043),(1517, 971)
+ (337, 455),(240, 359)
+ (1444, 403),(1346, 344)
+ (759, 187),(662, 163)
+ (2424, 160),(2424, 81)
 (5 rows)
 
 -- Test sorting 
-SELECT * FROM test_cube	WHERE c && '(3000,1000),(0,0)' GROUP BY c;
+SELECT * FROM test_cube	WHERE c && '(3000,1000),(0,0)' GROUP BY c ORDER BY c;
             c             
 --------------------------
+ (1594, 1043),(1517, 971)
  (337, 455),(240, 359)
- (759, 187),(662, 163)
  (1444, 403),(1346, 344)
- (1594, 1043),(1517, 971)
+ (759, 187),(662, 163)
  (2424, 160),(2424, 81)
 (5 rows)
 
diff --git a/contrib/cube/sql/cube.sql b/contrib/cube/sql/cube.sql
index fbfb11ed39098f8bc2e534f251809505a0011624..2c0e814d80e3269e7ef031408de5b65f6bd8cbdb 100644
--- a/contrib/cube/sql/cube.sql
+++ b/contrib/cube/sql/cube.sql
@@ -6,9 +6,11 @@
 -- first, define the datatype.  Turn off echoing so that expected file
 -- does not depend on contents of cube.sql.
 --
+SET client_min_messages = warning;
 \set ECHO none
 \i cube.sql
 \set ECHO all
+RESET client_min_messages;
 
 --
 -- testing the input and output functions
diff --git a/contrib/earthdistance/expected/earthdistance.out b/contrib/earthdistance/expected/earthdistance.out
index 6857384154b07e70256c14d9011f0b0c88396799..186f6178837cfd9788e1d8f5d376e1a777a38f8d 100644
--- a/contrib/earthdistance/expected/earthdistance.out
+++ b/contrib/earthdistance/expected/earthdistance.out
@@ -5,10 +5,9 @@
 -- first, define the datatype.  Turn off echoing so that expected file
 -- does not depend on contents of earthdistance.sql or cube.sql.
 --
+SET client_min_messages = warning;
 \set ECHO none
-psql:../cube/cube.sql:10: NOTICE:  type "cube" is not yet defined
-DETAIL:  Creating a shell type definition.
-psql:../cube/cube.sql:15: NOTICE:  argument type cube is only a shell
+RESET client_min_messages;
 --
 -- The radius of the Earth we are using.
 --
diff --git a/contrib/earthdistance/sql/earthdistance.sql b/contrib/earthdistance/sql/earthdistance.sql
index 6ea1ed25933c3252d5c2bd89f0481c30d1619836..f36f1a8bdbe250ac0232b6a932db6ae10a688df1 100644
--- a/contrib/earthdistance/sql/earthdistance.sql
+++ b/contrib/earthdistance/sql/earthdistance.sql
@@ -6,10 +6,12 @@
 -- first, define the datatype.  Turn off echoing so that expected file
 -- does not depend on contents of earthdistance.sql or cube.sql.
 --
+SET client_min_messages = warning;
 \set ECHO none
 \i ../cube/cube.sql
 \i earthdistance.sql
 \set ECHO all
+RESET client_min_messages;
 
 --
 -- The radius of the Earth we are using.