diff --git a/contrib/cube/cube--1.0.sql b/contrib/cube/cube--1.0.sql
index 0307811..1b563cc 100644
--- a/contrib/cube/cube--1.0.sql
+++ b/contrib/cube/cube--1.0.sql
@@ -1,36 +1,36 @@
 /* contrib/cube/cube--1.0.sql */
 
 -- complain if script is sourced in psql, rather than via CREATE EXTENSION
-\echo Use "CREATE EXTENSION cube" to load this file. \quit
+\echo Use "CREATE EXTENSION "cube"" to load this file. \quit
 
 -- Create the user-defined type for N-dimensional boxes
 
 CREATE FUNCTION cube_in(cstring)
-RETURNS cube
+RETURNS "cube"
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE FUNCTION cube(float8[], float8[]) RETURNS cube
+CREATE FUNCTION "cube"(float8[], float8[]) RETURNS "cube"
 AS 'MODULE_PATHNAME', 'cube_a_f8_f8'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE FUNCTION cube(float8[]) RETURNS cube
+CREATE FUNCTION "cube"(float8[]) RETURNS "cube"
 AS 'MODULE_PATHNAME', 'cube_a_f8'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE FUNCTION cube_out(cube)
+CREATE FUNCTION cube_out("cube")
 RETURNS cstring
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE TYPE cube (
+CREATE TYPE "cube" (
 	INTERNALLENGTH = variable,
 	INPUT = cube_in,
 	OUTPUT = cube_out,
 	ALIGNMENT = double
 );
 
-COMMENT ON TYPE cube IS 'multi-dimensional cube ''(FLOAT-1, FLOAT-2, ..., FLOAT-N), (FLOAT-1, FLOAT-2, ..., FLOAT-N)''';
+COMMENT ON TYPE "cube" IS 'multi-dimensional cube ''(FLOAT-1, FLOAT-2, ..., FLOAT-N), (FLOAT-1, FLOAT-2, ..., FLOAT-N)''';
 
 --
 -- External C-functions for R-tree methods
@@ -38,89 +38,89 @@ COMMENT ON TYPE cube IS 'multi-dimensional cube ''(FLOAT-1, FLOAT-2, ..., FLOAT-
 
 -- Comparison methods
 
-CREATE FUNCTION cube_eq(cube, cube)
+CREATE FUNCTION cube_eq("cube", "cube")
 RETURNS bool
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-COMMENT ON FUNCTION cube_eq(cube, cube) IS 'same as';
+COMMENT ON FUNCTION cube_eq("cube", "cube") IS 'same as';
 
-CREATE FUNCTION cube_ne(cube, cube)
+CREATE FUNCTION cube_ne("cube", "cube")
 RETURNS bool
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-COMMENT ON FUNCTION cube_ne(cube, cube) IS 'different';
+COMMENT ON FUNCTION cube_ne("cube", "cube") IS 'different';
 
-CREATE FUNCTION cube_lt(cube, cube)
+CREATE FUNCTION cube_lt("cube", "cube")
 RETURNS bool
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-COMMENT ON FUNCTION cube_lt(cube, cube) IS 'lower than';
+COMMENT ON FUNCTION cube_lt("cube", "cube") IS 'lower than';
 
-CREATE FUNCTION cube_gt(cube, cube)
+CREATE FUNCTION cube_gt("cube", "cube")
 RETURNS bool
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-COMMENT ON FUNCTION cube_gt(cube, cube) IS 'greater than';
+COMMENT ON FUNCTION cube_gt("cube", "cube") IS 'greater than';
 
-CREATE FUNCTION cube_le(cube, cube)
+CREATE FUNCTION cube_le("cube", "cube")
 RETURNS bool
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-COMMENT ON FUNCTION cube_le(cube, cube) IS 'lower than or equal to';
+COMMENT ON FUNCTION cube_le("cube", "cube") IS 'lower than or equal to';
 
-CREATE FUNCTION cube_ge(cube, cube)
+CREATE FUNCTION cube_ge("cube", "cube")
 RETURNS bool
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-COMMENT ON FUNCTION cube_ge(cube, cube) IS 'greater than or equal to';
+COMMENT ON FUNCTION cube_ge("cube", "cube") IS 'greater than or equal to';
 
-CREATE FUNCTION cube_cmp(cube, cube)
+CREATE FUNCTION cube_cmp("cube", "cube")
 RETURNS int4
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-COMMENT ON FUNCTION cube_cmp(cube, cube) IS 'btree comparison function';
+COMMENT ON FUNCTION cube_cmp("cube", "cube") IS 'btree comparison function';
 
-CREATE FUNCTION cube_contains(cube, cube)
+CREATE FUNCTION cube_contains("cube", "cube")
 RETURNS bool
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-COMMENT ON FUNCTION cube_contains(cube, cube) IS 'contains';
+COMMENT ON FUNCTION cube_contains("cube", "cube") IS 'contains';
 
-CREATE FUNCTION cube_contained(cube, cube)
+CREATE FUNCTION cube_contained("cube", "cube")
 RETURNS bool
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-COMMENT ON FUNCTION cube_contained(cube, cube) IS 'contained in';
+COMMENT ON FUNCTION cube_contained("cube", "cube") IS 'contained in';
 
-CREATE FUNCTION cube_overlap(cube, cube)
+CREATE FUNCTION cube_overlap("cube", "cube")
 RETURNS bool
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-COMMENT ON FUNCTION cube_overlap(cube, cube) IS 'overlaps';
+COMMENT ON FUNCTION cube_overlap("cube", "cube") IS 'overlaps';
 
 -- support routines for indexing
 
-CREATE FUNCTION cube_union(cube, cube)
-RETURNS cube
+CREATE FUNCTION cube_union("cube", "cube")
+RETURNS "cube"
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE FUNCTION cube_inter(cube, cube)
-RETURNS cube
+CREATE FUNCTION cube_inter("cube", "cube")
+RETURNS "cube"
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE FUNCTION cube_size(cube)
+CREATE FUNCTION cube_size("cube")
 RETURNS float8
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
@@ -128,62 +128,62 @@ LANGUAGE C IMMUTABLE STRICT;
 
 -- Misc N-dimensional functions
 
-CREATE FUNCTION cube_subset(cube, int4[])
-RETURNS cube
+CREATE FUNCTION cube_subset("cube", int4[])
+RETURNS "cube"
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
 -- proximity routines
 
-CREATE FUNCTION cube_distance(cube, cube)
+CREATE FUNCTION cube_distance("cube", "cube")
 RETURNS float8
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
 -- Extracting elements functions
 
-CREATE FUNCTION cube_dim(cube)
+CREATE FUNCTION cube_dim("cube")
 RETURNS int4
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE FUNCTION cube_ll_coord(cube, int4)
+CREATE FUNCTION cube_ll_coord("cube", int4)
 RETURNS float8
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE FUNCTION cube_ur_coord(cube, int4)
+CREATE FUNCTION cube_ur_coord("cube", int4)
 RETURNS float8
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE FUNCTION cube(float8) RETURNS cube
+CREATE FUNCTION "cube"(float8) RETURNS "cube"
 AS 'MODULE_PATHNAME', 'cube_f8'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE FUNCTION cube(float8, float8) RETURNS cube
+CREATE FUNCTION "cube"(float8, float8) RETURNS "cube"
 AS 'MODULE_PATHNAME', 'cube_f8_f8'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE FUNCTION cube(cube, float8) RETURNS cube
+CREATE FUNCTION "cube"("cube", float8) RETURNS "cube"
 AS 'MODULE_PATHNAME', 'cube_c_f8'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE FUNCTION cube(cube, float8, float8) RETURNS cube
+CREATE FUNCTION "cube"("cube", float8, float8) RETURNS "cube"
 AS 'MODULE_PATHNAME', 'cube_c_f8_f8'
 LANGUAGE C IMMUTABLE STRICT;
 
--- Test if cube is also a point
+-- Test if "cube" is also a point
 
-CREATE FUNCTION cube_is_point(cube)
+CREATE FUNCTION cube_is_point("cube")
 RETURNS bool
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
--- Increasing the size of a cube by a radius in at least n dimensions
+-- Increasing the size of a "cube" by a radius in at least n dimensions
 
-CREATE FUNCTION cube_enlarge(cube, float8, int4)
-RETURNS cube
+CREATE FUNCTION cube_enlarge("cube", float8, int4)
+RETURNS "cube"
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
@@ -192,76 +192,76 @@ LANGUAGE C IMMUTABLE STRICT;
 --
 
 CREATE OPERATOR < (
-	LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_lt,
+	LEFTARG = "cube", RIGHTARG = "cube", PROCEDURE = cube_lt,
 	COMMUTATOR = '>', NEGATOR = '>=',
 	RESTRICT = scalarltsel, JOIN = scalarltjoinsel
 );
 
 CREATE OPERATOR > (
-	LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_gt,
+	LEFTARG = "cube", RIGHTARG = "cube", PROCEDURE = cube_gt,
 	COMMUTATOR = '<', NEGATOR = '<=',
 	RESTRICT = scalargtsel, JOIN = scalargtjoinsel
 );
 
 CREATE OPERATOR <= (
-	LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_le,
+	LEFTARG = "cube", RIGHTARG = "cube", PROCEDURE = cube_le,
 	COMMUTATOR = '>=', NEGATOR = '>',
 	RESTRICT = scalarltsel, JOIN = scalarltjoinsel
 );
 
 CREATE OPERATOR >= (
-	LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_ge,
+	LEFTARG = "cube", RIGHTARG = "cube", PROCEDURE = cube_ge,
 	COMMUTATOR = '<=', NEGATOR = '<',
 	RESTRICT = scalargtsel, JOIN = scalargtjoinsel
 );
 
 CREATE OPERATOR && (
-	LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_overlap,
+	LEFTARG = "cube", RIGHTARG = "cube", PROCEDURE = cube_overlap,
 	COMMUTATOR = '&&',
 	RESTRICT = areasel, JOIN = areajoinsel
 );
 
 CREATE OPERATOR = (
-	LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_eq,
+	LEFTARG = "cube", RIGHTARG = "cube", PROCEDURE = cube_eq,
 	COMMUTATOR = '=', NEGATOR = '<>',
 	RESTRICT = eqsel, JOIN = eqjoinsel,
 	MERGES
 );
 
 CREATE OPERATOR <> (
-	LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_ne,
+	LEFTARG = "cube", RIGHTARG = "cube", PROCEDURE = cube_ne,
 	COMMUTATOR = '<>', NEGATOR = '=',
 	RESTRICT = neqsel, JOIN = neqjoinsel
 );
 
 CREATE OPERATOR @> (
-	LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_contains,
+	LEFTARG = "cube", RIGHTARG = "cube", PROCEDURE = cube_contains,
 	COMMUTATOR = '<@',
 	RESTRICT = contsel, JOIN = contjoinsel
 );
 
 CREATE OPERATOR <@ (
-	LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_contained,
+	LEFTARG = "cube", RIGHTARG = "cube", PROCEDURE = cube_contained,
 	COMMUTATOR = '@>',
 	RESTRICT = contsel, JOIN = contjoinsel
 );
 
 -- these are obsolete/deprecated:
 CREATE OPERATOR @ (
-	LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_contains,
+	LEFTARG = "cube", RIGHTARG = "cube", PROCEDURE = cube_contains,
 	COMMUTATOR = '~',
 	RESTRICT = contsel, JOIN = contjoinsel
 );
 
 CREATE OPERATOR ~ (
-	LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_contained,
+	LEFTARG = "cube", RIGHTARG = "cube", PROCEDURE = cube_contained,
 	COMMUTATOR = '@',
 	RESTRICT = contsel, JOIN = contjoinsel
 );
 
 
 -- define the GiST support methods
-CREATE FUNCTION g_cube_consistent(internal,cube,int,oid,internal)
+CREATE FUNCTION g_cube_consistent(internal,"cube",int,oid,internal)
 RETURNS bool
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
@@ -287,11 +287,11 @@ AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
 CREATE FUNCTION g_cube_union(internal, internal)
-RETURNS cube
+RETURNS "cube"
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
 
-CREATE FUNCTION g_cube_same(cube, cube, internal)
+CREATE FUNCTION g_cube_same("cube", "cube", internal)
 RETURNS internal
 AS 'MODULE_PATHNAME'
 LANGUAGE C IMMUTABLE STRICT;
@@ -300,26 +300,26 @@ LANGUAGE C IMMUTABLE STRICT;
 -- Create the operator classes for indexing
 
 CREATE OPERATOR CLASS cube_ops
-    DEFAULT FOR TYPE cube USING btree AS
+    DEFAULT FOR TYPE "cube" USING btree AS
         OPERATOR        1       < ,
         OPERATOR        2       <= ,
         OPERATOR        3       = ,
         OPERATOR        4       >= ,
         OPERATOR        5       > ,
-        FUNCTION        1       cube_cmp(cube, cube);
+        FUNCTION        1       cube_cmp("cube", "cube");
 
 CREATE OPERATOR CLASS gist_cube_ops
-    DEFAULT FOR TYPE cube USING gist AS
+    DEFAULT FOR TYPE "cube" USING gist AS
 	OPERATOR	3	&& ,
 	OPERATOR	6	= ,
 	OPERATOR	7	@> ,
 	OPERATOR	8	<@ ,
 	OPERATOR	13	@ ,
 	OPERATOR	14	~ ,
-	FUNCTION	1	g_cube_consistent (internal, cube, int, oid, internal),
+	FUNCTION	1	g_cube_consistent (internal, "cube", int, oid, internal),
 	FUNCTION	2	g_cube_union (internal, internal),
 	FUNCTION	3	g_cube_compress (internal),
 	FUNCTION	4	g_cube_decompress (internal),
 	FUNCTION	5	g_cube_penalty (internal, internal, internal),
 	FUNCTION	6	g_cube_picksplit (internal, internal),
-	FUNCTION	7	g_cube_same (cube, cube, internal);
+	FUNCTION	7	g_cube_same ("cube", "cube", internal);
diff --git a/contrib/cube/cube--unpackaged--1.0.sql b/contrib/cube/cube--unpackaged--1.0.sql
index 6859682..eacffce 100644
--- a/contrib/cube/cube--unpackaged--1.0.sql
+++ b/contrib/cube/cube--unpackaged--1.0.sql
@@ -1,56 +1,56 @@
-/* contrib/cube/cube--unpackaged--1.0.sql */
+/* contrib/"cube"/"cube"--unpackaged--1.0.sql */
 
 -- complain if script is sourced in psql, rather than via CREATE EXTENSION
-\echo Use "CREATE EXTENSION cube" to load this file. \quit
+\echo Use "CREATE EXTENSION "cube"" to load this file. \quit
 
-ALTER EXTENSION cube ADD type cube;
-ALTER EXTENSION cube ADD function cube_in(cstring);
-ALTER EXTENSION cube ADD function cube(double precision[],double precision[]);
-ALTER EXTENSION cube ADD function cube(double precision[]);
-ALTER EXTENSION cube ADD function cube_out(cube);
-ALTER EXTENSION cube ADD function cube_eq(cube,cube);
-ALTER EXTENSION cube ADD function cube_ne(cube,cube);
-ALTER EXTENSION cube ADD function cube_lt(cube,cube);
-ALTER EXTENSION cube ADD function cube_gt(cube,cube);
-ALTER EXTENSION cube ADD function cube_le(cube,cube);
-ALTER EXTENSION cube ADD function cube_ge(cube,cube);
-ALTER EXTENSION cube ADD function cube_cmp(cube,cube);
-ALTER EXTENSION cube ADD function cube_contains(cube,cube);
-ALTER EXTENSION cube ADD function cube_contained(cube,cube);
-ALTER EXTENSION cube ADD function cube_overlap(cube,cube);
-ALTER EXTENSION cube ADD function cube_union(cube,cube);
-ALTER EXTENSION cube ADD function cube_inter(cube,cube);
-ALTER EXTENSION cube ADD function cube_size(cube);
-ALTER EXTENSION cube ADD function cube_subset(cube,integer[]);
-ALTER EXTENSION cube ADD function cube_distance(cube,cube);
-ALTER EXTENSION cube ADD function cube_dim(cube);
-ALTER EXTENSION cube ADD function cube_ll_coord(cube,integer);
-ALTER EXTENSION cube ADD function cube_ur_coord(cube,integer);
-ALTER EXTENSION cube ADD function cube(double precision);
-ALTER EXTENSION cube ADD function cube(double precision,double precision);
-ALTER EXTENSION cube ADD function cube(cube,double precision);
-ALTER EXTENSION cube ADD function cube(cube,double precision,double precision);
-ALTER EXTENSION cube ADD function cube_is_point(cube);
-ALTER EXTENSION cube ADD function cube_enlarge(cube,double precision,integer);
-ALTER EXTENSION cube ADD operator >(cube,cube);
-ALTER EXTENSION cube ADD operator >=(cube,cube);
-ALTER EXTENSION cube ADD operator <(cube,cube);
-ALTER EXTENSION cube ADD operator <=(cube,cube);
-ALTER EXTENSION cube ADD operator &&(cube,cube);
-ALTER EXTENSION cube ADD operator <>(cube,cube);
-ALTER EXTENSION cube ADD operator =(cube,cube);
-ALTER EXTENSION cube ADD operator <@(cube,cube);
-ALTER EXTENSION cube ADD operator @>(cube,cube);
-ALTER EXTENSION cube ADD operator ~(cube,cube);
-ALTER EXTENSION cube ADD operator @(cube,cube);
-ALTER EXTENSION cube ADD function g_cube_consistent(internal,cube,integer,oid,internal);
-ALTER EXTENSION cube ADD function g_cube_compress(internal);
-ALTER EXTENSION cube ADD function g_cube_decompress(internal);
-ALTER EXTENSION cube ADD function g_cube_penalty(internal,internal,internal);
-ALTER EXTENSION cube ADD function g_cube_picksplit(internal,internal);
-ALTER EXTENSION cube ADD function g_cube_union(internal,internal);
-ALTER EXTENSION cube ADD function g_cube_same(cube,cube,internal);
-ALTER EXTENSION cube ADD operator family cube_ops using btree;
-ALTER EXTENSION cube ADD operator class cube_ops using btree;
-ALTER EXTENSION cube ADD operator family gist_cube_ops using gist;
-ALTER EXTENSION cube ADD operator class gist_cube_ops using gist;
+ALTER EXTENSION "cube" ADD type "cube";
+ALTER EXTENSION "cube" ADD function cube_in(cstring);
+ALTER EXTENSION "cube" ADD function "cube"(double precision[],double precision[]);
+ALTER EXTENSION "cube" ADD function "cube"(double precision[]);
+ALTER EXTENSION "cube" ADD function cube_out("cube");
+ALTER EXTENSION "cube" ADD function cube_eq("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_ne("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_lt("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_gt("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_le("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_ge("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_cmp("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_contains("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_contained("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_overlap("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_union("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_inter("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_size("cube");
+ALTER EXTENSION "cube" ADD function cube_subset("cube",integer[]);
+ALTER EXTENSION "cube" ADD function cube_distance("cube","cube");
+ALTER EXTENSION "cube" ADD function cube_dim("cube");
+ALTER EXTENSION "cube" ADD function cube_ll_coord("cube",integer);
+ALTER EXTENSION "cube" ADD function cube_ur_coord("cube",integer);
+ALTER EXTENSION "cube" ADD function "cube"(double precision);
+ALTER EXTENSION "cube" ADD function "cube"(double precision,double precision);
+ALTER EXTENSION "cube" ADD function "cube"("cube",double precision);
+ALTER EXTENSION "cube" ADD function "cube"("cube",double precision,double precision);
+ALTER EXTENSION "cube" ADD function cube_is_point("cube");
+ALTER EXTENSION "cube" ADD function cube_enlarge("cube",double precision,integer);
+ALTER EXTENSION "cube" ADD operator >("cube","cube");
+ALTER EXTENSION "cube" ADD operator >=("cube","cube");
+ALTER EXTENSION "cube" ADD operator <("cube","cube");
+ALTER EXTENSION "cube" ADD operator <=("cube","cube");
+ALTER EXTENSION "cube" ADD operator &&("cube","cube");
+ALTER EXTENSION "cube" ADD operator <>("cube","cube");
+ALTER EXTENSION "cube" ADD operator =("cube","cube");
+ALTER EXTENSION "cube" ADD operator <@("cube","cube");
+ALTER EXTENSION "cube" ADD operator @>("cube","cube");
+ALTER EXTENSION "cube" ADD operator ~("cube","cube");
+ALTER EXTENSION "cube" ADD operator @("cube","cube");
+ALTER EXTENSION "cube" ADD function g_cube_consistent(internal,"cube",integer,oid,internal);
+ALTER EXTENSION "cube" ADD function g_cube_compress(internal);
+ALTER EXTENSION "cube" ADD function g_cube_decompress(internal);
+ALTER EXTENSION "cube" ADD function g_cube_penalty(internal,internal,internal);
+ALTER EXTENSION "cube" ADD function g_cube_picksplit(internal,internal);
+ALTER EXTENSION "cube" ADD function g_cube_union(internal,internal);
+ALTER EXTENSION "cube" ADD function g_cube_same("cube","cube",internal);
+ALTER EXTENSION "cube" ADD operator family cube_ops using btree;
+ALTER EXTENSION "cube" ADD operator class cube_ops using btree;
+ALTER EXTENSION "cube" ADD operator family gist_cube_ops using gist;
+ALTER EXTENSION "cube" ADD operator class gist_cube_ops using gist;
diff --git a/contrib/cube/expected/cube.out b/contrib/cube/expected/cube.out
index ca9555e..9422218 100644
--- a/contrib/cube/expected/cube.out
+++ b/contrib/cube/expected/cube.out
@@ -1,552 +1,552 @@
 --
 --  Test cube datatype
 --
-CREATE EXTENSION cube;
+CREATE EXTENSION "cube";
 --
 -- testing the input and output functions
 --
 -- Any number (a one-dimensional point)
-SELECT '1'::cube AS cube;
+SELECT '1'::"cube" AS "cube";
  cube 
 ------
  (1)
 (1 row)
 
-SELECT '-1'::cube AS cube;
+SELECT '-1'::"cube" AS "cube";
  cube 
 ------
  (-1)
 (1 row)
 
-SELECT '1.'::cube AS cube;
+SELECT '1.'::"cube" AS "cube";
  cube 
 ------
  (1)
 (1 row)
 
-SELECT '-1.'::cube AS cube;
+SELECT '-1.'::"cube" AS "cube";
  cube 
 ------
  (-1)
 (1 row)
 
-SELECT '.1'::cube AS cube;
+SELECT '.1'::"cube" AS "cube";
  cube  
 -------
  (0.1)
 (1 row)
 
-SELECT '-.1'::cube AS cube;
+SELECT '-.1'::"cube" AS "cube";
   cube  
 --------
  (-0.1)
 (1 row)
 
-SELECT '1.0'::cube AS cube;
+SELECT '1.0'::"cube" AS "cube";
  cube 
 ------
  (1)
 (1 row)
 
-SELECT '-1.0'::cube AS cube;
+SELECT '-1.0'::"cube" AS "cube";
  cube 
 ------
  (-1)
 (1 row)
 
-SELECT '1e27'::cube AS cube;
+SELECT '1e27'::"cube" AS "cube";
   cube   
 ---------
  (1e+27)
 (1 row)
 
-SELECT '-1e27'::cube AS cube;
+SELECT '-1e27'::"cube" AS "cube";
    cube   
 ----------
  (-1e+27)
 (1 row)
 
-SELECT '1.0e27'::cube AS cube;
+SELECT '1.0e27'::"cube" AS "cube";
   cube   
 ---------
  (1e+27)
 (1 row)
 
-SELECT '-1.0e27'::cube AS cube;
+SELECT '-1.0e27'::"cube" AS "cube";
    cube   
 ----------
  (-1e+27)
 (1 row)
 
-SELECT '1e+27'::cube AS cube;
+SELECT '1e+27'::"cube" AS "cube";
   cube   
 ---------
  (1e+27)
 (1 row)
 
-SELECT '-1e+27'::cube AS cube;
+SELECT '-1e+27'::"cube" AS "cube";
    cube   
 ----------
  (-1e+27)
 (1 row)
 
-SELECT '1.0e+27'::cube AS cube;
+SELECT '1.0e+27'::"cube" AS "cube";
   cube   
 ---------
  (1e+27)
 (1 row)
 
-SELECT '-1.0e+27'::cube AS cube;
+SELECT '-1.0e+27'::"cube" AS "cube";
    cube   
 ----------
  (-1e+27)
 (1 row)
 
-SELECT '1e-7'::cube AS cube;
+SELECT '1e-7'::"cube" AS "cube";
   cube   
 ---------
  (1e-07)
 (1 row)
 
-SELECT '-1e-7'::cube AS cube;
+SELECT '-1e-7'::"cube" AS "cube";
    cube   
 ----------
  (-1e-07)
 (1 row)
 
-SELECT '1.0e-7'::cube AS cube;
+SELECT '1.0e-7'::"cube" AS "cube";
   cube   
 ---------
  (1e-07)
 (1 row)
 
-SELECT '-1.0e-7'::cube AS cube;
+SELECT '-1.0e-7'::"cube" AS "cube";
    cube   
 ----------
  (-1e-07)
 (1 row)
 
-SELECT '1e-700'::cube AS cube;
+SELECT '1e-700'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '-1e-700'::cube AS cube;
+SELECT '-1e-700'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '1234567890123456'::cube AS cube;
+SELECT '1234567890123456'::"cube" AS "cube";
           cube          
 ------------------------
  (1.23456789012346e+15)
 (1 row)
 
-SELECT '+1234567890123456'::cube AS cube;
+SELECT '+1234567890123456'::"cube" AS "cube";
           cube          
 ------------------------
  (1.23456789012346e+15)
 (1 row)
 
-SELECT '-1234567890123456'::cube AS cube;
+SELECT '-1234567890123456'::"cube" AS "cube";
           cube           
 -------------------------
  (-1.23456789012346e+15)
 (1 row)
 
-SELECT '.1234567890123456'::cube AS cube;
+SELECT '.1234567890123456'::"cube" AS "cube";
         cube         
 ---------------------
  (0.123456789012346)
 (1 row)
 
-SELECT '+.1234567890123456'::cube AS cube;
+SELECT '+.1234567890123456'::"cube" AS "cube";
         cube         
 ---------------------
  (0.123456789012346)
 (1 row)
 
-SELECT '-.1234567890123456'::cube AS cube;
+SELECT '-.1234567890123456'::"cube" AS "cube";
          cube         
 ----------------------
  (-0.123456789012346)
 (1 row)
 
 -- simple lists (points)
-SELECT '1,2'::cube AS cube;
+SELECT '1,2'::"cube" AS "cube";
   cube  
 --------
  (1, 2)
 (1 row)
 
-SELECT '(1,2)'::cube AS cube;
+SELECT '(1,2)'::"cube" AS "cube";
   cube  
 --------
  (1, 2)
 (1 row)
 
-SELECT '1,2,3,4,5'::cube AS cube;
+SELECT '1,2,3,4,5'::"cube" AS "cube";
       cube       
 -----------------
  (1, 2, 3, 4, 5)
 (1 row)
 
-SELECT '(1,2,3,4,5)'::cube AS cube;
+SELECT '(1,2,3,4,5)'::"cube" AS "cube";
       cube       
 -----------------
  (1, 2, 3, 4, 5)
 (1 row)
 
 -- double lists (cubes)
-SELECT '(0),(0)'::cube AS cube;
+SELECT '(0),(0)'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '(0),(1)'::cube AS cube;
+SELECT '(0),(1)'::"cube" AS "cube";
   cube   
 ---------
  (0),(1)
 (1 row)
 
-SELECT '[(0),(0)]'::cube AS cube;
+SELECT '[(0),(0)]'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '[(0),(1)]'::cube AS cube;
+SELECT '[(0),(1)]'::"cube" AS "cube";
   cube   
 ---------
  (0),(1)
 (1 row)
 
-SELECT '(0,0,0,0),(0,0,0,0)'::cube AS cube;
+SELECT '(0,0,0,0),(0,0,0,0)'::"cube" AS "cube";
      cube     
 --------------
  (0, 0, 0, 0)
 (1 row)
 
-SELECT '(0,0,0,0),(1,0,0,0)'::cube AS cube;
+SELECT '(0,0,0,0),(1,0,0,0)'::"cube" AS "cube";
            cube            
 ---------------------------
  (0, 0, 0, 0),(1, 0, 0, 0)
 (1 row)
 
-SELECT '[(0,0,0,0),(0,0,0,0)]'::cube AS cube;
+SELECT '[(0,0,0,0),(0,0,0,0)]'::"cube" AS "cube";
      cube     
 --------------
  (0, 0, 0, 0)
 (1 row)
 
-SELECT '[(0,0,0,0),(1,0,0,0)]'::cube AS cube;
+SELECT '[(0,0,0,0),(1,0,0,0)]'::"cube" AS "cube";
            cube            
 ---------------------------
  (0, 0, 0, 0),(1, 0, 0, 0)
 (1 row)
 
 -- invalid input: parse errors
-SELECT ''::cube AS cube;
+SELECT ''::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT ''::cube AS cube;
+LINE 1: SELECT ''::"cube" AS "cube";
                ^
 DETAIL:  syntax error at end of input
-SELECT 'ABC'::cube AS cube;
+SELECT 'ABC'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT 'ABC'::cube AS cube;
+LINE 1: SELECT 'ABC'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "A"
-SELECT '()'::cube AS cube;
+SELECT '()'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '()'::cube AS cube;
+LINE 1: SELECT '()'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '[]'::cube AS cube;
+SELECT '[]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[]'::cube AS cube;
+LINE 1: SELECT '[]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "]"
-SELECT '[()]'::cube AS cube;
+SELECT '[()]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[()]'::cube AS cube;
+LINE 1: SELECT '[()]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '[(1)]'::cube AS cube;
+SELECT '[(1)]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1)]'::cube AS cube;
+LINE 1: SELECT '[(1)]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "]"
-SELECT '[(1),]'::cube AS cube;
+SELECT '[(1),]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),]'::cube AS cube;
+LINE 1: SELECT '[(1),]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "]"
-SELECT '[(1),2]'::cube AS cube;
+SELECT '[(1),2]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),2]'::cube AS cube;
+LINE 1: SELECT '[(1),2]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "2"
-SELECT '[(1),(2),(3)]'::cube AS cube;
+SELECT '[(1),(2),(3)]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),(2),(3)]'::cube AS cube;
+LINE 1: SELECT '[(1),(2),(3)]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '1,'::cube AS cube;
+SELECT '1,'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '1,'::cube AS cube;
+LINE 1: SELECT '1,'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at end of input
-SELECT '1,2,'::cube AS cube;
+SELECT '1,2,'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '1,2,'::cube AS cube;
+LINE 1: SELECT '1,2,'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at end of input
-SELECT '1,,2'::cube AS cube;
+SELECT '1,,2'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '1,,2'::cube AS cube;
+LINE 1: SELECT '1,,2'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '(1,)'::cube AS cube;
+SELECT '(1,)'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,)'::cube AS cube;
+LINE 1: SELECT '(1,)'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '(1,2,)'::cube AS cube;
+SELECT '(1,2,)'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,)'::cube AS cube;
+LINE 1: SELECT '(1,2,)'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '(1,,2)'::cube AS cube;
+SELECT '(1,,2)'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,,2)'::cube AS cube;
+LINE 1: SELECT '(1,,2)'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
 -- invalid input: semantic errors and trailing garbage
-SELECT '[(1),(2)],'::cube AS cube; -- 0
+SELECT '[(1),(2)],'::"cube" AS "cube"; -- 0
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),(2)],'::cube AS cube;
+LINE 1: SELECT '[(1),(2)],'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '[(1,2,3),(2,3)]'::cube AS cube; -- 1
+SELECT '[(1,2,3),(2,3)]'::"cube" AS "cube"; -- 1
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1,2,3),(2,3)]'::cube AS cube;
+LINE 1: SELECT '[(1,2,3),(2,3)]'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2,3) and (2,3).
-SELECT '[(1,2),(1,2,3)]'::cube AS cube; -- 1
+SELECT '[(1,2),(1,2,3)]'::"cube" AS "cube"; -- 1
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1,2),(1,2,3)]'::cube AS cube;
+LINE 1: SELECT '[(1,2),(1,2,3)]'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2) and (1,2,3).
-SELECT '(1),(2),'::cube AS cube; -- 2
+SELECT '(1),(2),'::"cube" AS "cube"; -- 2
 ERROR:  bad cube representation
-LINE 1: SELECT '(1),(2),'::cube AS cube;
+LINE 1: SELECT '(1),(2),'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
+SELECT '(1,2,3),(2,3)'::"cube" AS "cube"; -- 3
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,3),(2,3)'::cube AS cube;
+LINE 1: SELECT '(1,2,3),(2,3)'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2,3) and (2,3).
-SELECT '(1,2),(1,2,3)'::cube AS cube; -- 3
+SELECT '(1,2),(1,2,3)'::"cube" AS "cube"; -- 3
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2),(1,2,3)'::cube AS cube;
+LINE 1: SELECT '(1,2),(1,2,3)'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2) and (1,2,3).
-SELECT '(1,2,3)ab'::cube AS cube; -- 4
+SELECT '(1,2,3)ab'::"cube" AS "cube"; -- 4
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,3)ab'::cube AS cube;
+LINE 1: SELECT '(1,2,3)ab'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '(1,2,3)a'::cube AS cube; -- 5
+SELECT '(1,2,3)a'::"cube" AS "cube"; -- 5
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,3)a'::cube AS cube;
+LINE 1: SELECT '(1,2,3)a'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '(1,2)('::cube AS cube; -- 5
+SELECT '(1,2)('::"cube" AS "cube"; -- 5
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2)('::cube AS cube;
+LINE 1: SELECT '(1,2)('::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "("
-SELECT '1,2ab'::cube AS cube; -- 6
+SELECT '1,2ab'::"cube" AS "cube"; -- 6
 ERROR:  bad cube representation
-LINE 1: SELECT '1,2ab'::cube AS cube;
+LINE 1: SELECT '1,2ab'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '1 e7'::cube AS cube; -- 6
+SELECT '1 e7'::"cube" AS "cube"; -- 6
 ERROR:  bad cube representation
-LINE 1: SELECT '1 e7'::cube AS cube;
+LINE 1: SELECT '1 e7'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "e"
-SELECT '1,2a'::cube AS cube; -- 7
+SELECT '1,2a'::"cube" AS "cube"; -- 7
 ERROR:  bad cube representation
-LINE 1: SELECT '1,2a'::cube AS cube;
+LINE 1: SELECT '1,2a'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '1..2'::cube AS cube; -- 7
+SELECT '1..2'::"cube" AS "cube"; -- 7
 ERROR:  bad cube representation
-LINE 1: SELECT '1..2'::cube AS cube;
+LINE 1: SELECT '1..2'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ".2"
 --
 -- Testing building cubes from float8 values
 --
-SELECT cube(0::float8);
+SELECT "cube"(0::float8);
  cube 
 ------
  (0)
 (1 row)
 
-SELECT cube(1::float8);
+SELECT "cube"(1::float8);
  cube 
 ------
  (1)
 (1 row)
 
-SELECT cube(1,2);
+SELECT "cube"(1,2);
   cube   
 ---------
  (1),(2)
 (1 row)
 
-SELECT cube(cube(1,2),3);
+SELECT "cube"("cube"(1,2),3);
      cube      
 ---------------
  (1, 3),(2, 3)
 (1 row)
 
-SELECT cube(cube(1,2),3,4);
+SELECT "cube"("cube"(1,2),3,4);
      cube      
 ---------------
  (1, 3),(2, 4)
 (1 row)
 
-SELECT cube(cube(cube(1,2),3,4),5);
+SELECT "cube"("cube"("cube"(1,2),3,4),5);
         cube         
 ---------------------
  (1, 3, 5),(2, 4, 5)
 (1 row)
 
-SELECT cube(cube(cube(1,2),3,4),5,6);
+SELECT "cube"("cube"("cube"(1,2),3,4),5,6);
         cube         
 ---------------------
  (1, 3, 5),(2, 4, 6)
 (1 row)
 
 --
--- Test that the text -> cube cast was installed.
+-- Test that the text -> "cube" cast was installed.
 --
-SELECT '(0)'::text::cube;
+SELECT '(0)'::text::"cube";
  cube 
 ------
  (0)
 (1 row)
 
 --
--- Test the float[] -> cube cast
+-- Test the float[] -> "cube" cast
 --
-SELECT cube('{0,1,2}'::float[], '{3,4,5}'::float[]);
+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[]);
+SELECT "cube"('{0,1,2}'::float[], '{3}'::float[]);
 ERROR:  UR and LL arrays must be of same length
-SELECT cube(NULL::float[], '{3}'::float[]);
+SELECT "cube"(NULL::float[], '{3}'::float[]);
  cube 
 ------
  
 (1 row)
 
-SELECT cube('{0,1,2}'::float[]);
+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]);
+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),(1,3,5)'), ARRAY[3,2,1,1]);
+SELECT cube_subset("cube"('(1,3,5),(1,3,5)'), ARRAY[3,2,1,1]);
  cube_subset  
 --------------
  (5, 3, 1, 1)
 (1 row)
 
-SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
+SELECT cube_subset("cube"('(1,3,5),(6,7,8)'), ARRAY[4,0]);
 ERROR:  Index out of bounds
-SELECT cube_subset(cube('(6,7,8),(6,7,8)'), ARRAY[4,0]);
+SELECT cube_subset("cube"('(6,7,8),(6,7,8)'), ARRAY[4,0]);
 ERROR:  Index out of bounds
 --
 -- Test point processing
 --
-SELECT cube('(1,2),(1,2)'); -- cube_in
+SELECT "cube"('(1,2),(1,2)'); -- cube_in
   cube  
 --------
  (1, 2)
 (1 row)
 
-SELECT cube('{0,1,2}'::float[], '{0,1,2}'::float[]); -- cube_a_f8_f8
+SELECT "cube"('{0,1,2}'::float[], '{0,1,2}'::float[]); -- cube_a_f8_f8
    cube    
 -----------
  (0, 1, 2)
 (1 row)
 
-SELECT cube('{5,6,7,8}'::float[]); -- cube_a_f8
+SELECT "cube"('{5,6,7,8}'::float[]); -- cube_a_f8
      cube     
 --------------
  (5, 6, 7, 8)
 (1 row)
 
-SELECT cube(1.37); -- cube_f8
+SELECT "cube"(1.37); -- cube_f8
   cube  
 --------
  (1.37)
 (1 row)
 
-SELECT cube(1.37, 1.37); -- cube_f8_f8
+SELECT "cube"(1.37, 1.37); -- cube_f8_f8
   cube  
 --------
  (1.37)
 (1 row)
 
-SELECT cube(cube(1,1), 42); -- cube_c_f8
+SELECT "cube"("cube"(1,1), 42); -- cube_c_f8
   cube   
 ---------
  (1, 42)
 (1 row)
 
-SELECT cube(cube(1,2), 42); -- cube_c_f8
+SELECT "cube"("cube"(1,2), 42); -- cube_c_f8
       cube       
 -----------------
  (1, 42),(2, 42)
 (1 row)
 
-SELECT cube(cube(1,1), 42, 42); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,1), 42, 42); -- cube_c_f8_f8
   cube   
 ---------
  (1, 42)
 (1 row)
 
-SELECT cube(cube(1,1), 42, 24); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,1), 42, 24); -- cube_c_f8_f8
       cube       
 -----------------
  (1, 42),(1, 24)
 (1 row)
 
-SELECT cube(cube(1,2), 42, 42); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,2), 42, 42); -- cube_c_f8_f8
       cube       
 -----------------
  (1, 42),(2, 42)
 (1 row)
 
-SELECT cube(cube(1,2), 42, 24); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,2), 42, 24); -- cube_c_f8_f8
       cube       
 -----------------
  (1, 42),(2, 24)
@@ -555,12 +555,12 @@ SELECT cube(cube(1,2), 42, 24); -- cube_c_f8_f8
 --
 -- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
 --
-select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::cube;
+select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::"cube";
 ERROR:  bad cube representation
 LINE 1: select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...
                ^
 DETAIL:  A cube cannot have more than 100 dimensions.
-select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::cube;
+select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::"cube";
 ERROR:  bad cube representation
 LINE 1: select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...
                ^
@@ -570,37 +570,37 @@ DETAIL:  A cube cannot have more than 100 dimensions.
 --
 -- equality/inequality:
 --
-SELECT '24, 33.20'::cube    =  '24, 33.20'::cube AS bool;
+SELECT '24, 33.20'::"cube"    =  '24, 33.20'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '24, 33.20'::cube    != '24, 33.20'::cube AS bool;
+SELECT '24, 33.20'::"cube"    != '24, 33.20'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '24, 33.20'::cube    =  '24, 33.21'::cube AS bool;
+SELECT '24, 33.20'::"cube"    =  '24, 33.21'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '24, 33.20'::cube    != '24, 33.21'::cube AS bool;
+SELECT '24, 33.20'::"cube"    != '24, 33.21'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"  =  '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"  =  '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
  bool 
 ------
  f
@@ -609,97 +609,97 @@ SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
 -- "lower than" / "greater than"
 -- (these operators are not useful for anything but ordering)
 --
-SELECT '1'::cube   > '2'::cube AS bool;
+SELECT '1'::"cube"   > '2'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '1'::cube   < '2'::cube AS bool;
+SELECT '1'::"cube"   < '2'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '1,1'::cube > '1,2'::cube AS bool;
+SELECT '1,1'::"cube" > '1,2'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '1,1'::cube < '1,2'::cube AS bool;
+SELECT '1,1'::"cube" < '1,2'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,1),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,1),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,1),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,1),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,1)'::cube > '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,1)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,1)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,1)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0,0,0,1),(3,1,0,0,0)'::cube > '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,1),(3,1,0,0,0)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,1),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,1),(3,1,0,0,0)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube > '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,0)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,0)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  f
@@ -707,235 +707,235 @@ SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
 
 -- "overlap"
 --
-SELECT '1'::cube && '1'::cube AS bool;
+SELECT '1'::"cube" && '1'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '1'::cube && '2'::cube AS bool;
+SELECT '1'::"cube" && '2'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '0'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '0'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '1'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '1'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '1,1,1'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '1,1,1'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(1,1,1),(2,2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(1,1,1),(2,2,2)]'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(1,1),(2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(1,1),(2,2)]'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(2,1,1),(2,2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(2,1,1),(2,2,2)]'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
--- "contained in" (the left operand is the cube entirely enclosed by
+-- "contained in" (the left operand is the "cube" entirely enclosed by
 -- the right operand):
 --
-SELECT '0'::cube                 <@ '0'::cube                        AS bool;
+SELECT '0'::"cube"                 <@ '0'::"cube"                        AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,0'::cube             <@ '0,0,0'::cube                    AS bool;
+SELECT '0,0,0'::"cube"             <@ '0,0,0'::"cube"                    AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0'::cube               <@ '0,0,1'::cube                    AS bool;
+SELECT '0,0'::"cube"               <@ '0,0,1'::"cube"                    AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,0'::cube             <@ '0,0,1'::cube                    AS bool;
+SELECT '0,0,0'::"cube"             <@ '0,0,1'::"cube"                    AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '1,0,0'::cube             <@ '0,0,1'::cube                    AS bool;
+SELECT '1,0,0'::"cube"             <@ '0,0,1'::"cube"                    AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(1,0,0),(0,0,1)'::cube          AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(1,0,0),(0,0,1)'::"cube"          AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(-1,-1,-1),(1,1,1)'::cube       AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(-1,-1,-1),(1,1,1)'::"cube"       AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(-1,-1,-1,-1),(1,1,1,1)'::cube  AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(-1,-1,-1,-1),(1,1,1,1)'::"cube"  AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0'::cube                 <@ '(-1),(1)'::cube                 AS bool;
+SELECT '0'::"cube"                 <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '1'::cube                 <@ '(-1),(1)'::cube                 AS bool;
+SELECT '1'::"cube"                 <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '-1'::cube                <@ '(-1),(1)'::cube                 AS bool;
+SELECT '-1'::"cube"                <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube          <@ '(-1),(1)'::cube                 AS bool;
+SELECT '(-1),(1)'::"cube"          <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube          <@ '(-1,-1),(1,1)'::cube            AS bool;
+SELECT '(-1),(1)'::"cube"          <@ '(-1,-1),(1,1)'::"cube"            AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-2),(1)'::cube          <@ '(-1),(1)'::cube                 AS bool;
+SELECT '(-2),(1)'::"cube"          <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(-2),(1)'::cube          <@ '(-1,-1),(1,1)'::cube            AS bool;
+SELECT '(-2),(1)'::"cube"          <@ '(-1,-1),(1,1)'::"cube"            AS bool;
  bool 
 ------
  f
 (1 row)
 
--- "contains" (the left operand is the cube that entirely encloses the
+-- "contains" (the left operand is the "cube" that entirely encloses the
 -- right operand)
 --
-SELECT '0'::cube                        @> '0'::cube                 AS bool;
+SELECT '0'::"cube"                        @> '0'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,0'::cube                    @> '0,0,0'::cube             AS bool;
+SELECT '0,0,0'::"cube"                    @> '0,0,0'::"cube"             AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,1'::cube                    @> '0,0'::cube               AS bool;
+SELECT '0,0,1'::"cube"                    @> '0,0'::"cube"               AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,1'::cube                    @> '0,0,0'::cube             AS bool;
+SELECT '0,0,1'::"cube"                    @> '0,0,0'::"cube"             AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '0,0,1'::cube                    @> '1,0,0'::cube             AS bool;
+SELECT '0,0,1'::"cube"                    @> '1,0,0'::"cube"             AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube          @> '(1,0,0),(0,0,1)'::cube   AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"          @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1,-1,-1),(1,1,1)'::cube       @> '(1,0,0),(0,0,1)'::cube   AS bool;
+SELECT '(-1,-1,-1),(1,1,1)'::"cube"       @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1,-1,-1,-1),(1,1,1,1)'::cube  @> '(1,0,0),(0,0,1)'::cube   AS bool;
+SELECT '(-1,-1,-1,-1),(1,1,1,1)'::"cube"  @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '0'::cube                 AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '0'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '1'::cube                 AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '1'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '-1'::cube                AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '-1'::"cube"                AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '(-1),(1)'::cube          AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '(-1),(1)'::"cube"          AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1,-1),(1,1)'::cube            @> '(-1),(1)'::cube          AS bool;
+SELECT '(-1,-1),(1,1)'::"cube"            @> '(-1),(1)'::"cube"          AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '(-2),(1)'::cube          AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '(-2),(1)'::"cube"          AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(-1,-1),(1,1)'::cube            @> '(-2),(1)'::cube          AS bool;
+SELECT '(-1,-1),(1,1)'::"cube"            @> '(-2),(1)'::"cube"          AS bool;
  bool 
 ------
  f
@@ -943,77 +943,77 @@ SELECT '(-1,-1),(1,1)'::cube            @> '(-2),(1)'::cube          AS bool;
 
 -- Test of distance function
 --
-SELECT cube_distance('(0)'::cube,'(2,2,2,2)'::cube);
+SELECT cube_distance('(0)'::"cube",'(2,2,2,2)'::"cube");
  cube_distance 
 ---------------
              4
 (1 row)
 
-SELECT cube_distance('(0)'::cube,'(.3,.4)'::cube);
+SELECT cube_distance('(0)'::"cube",'(.3,.4)'::"cube");
  cube_distance 
 ---------------
            0.5
 (1 row)
 
-SELECT cube_distance('(2,3,4)'::cube,'(2,3,4)'::cube);
+SELECT cube_distance('(2,3,4)'::"cube",'(2,3,4)'::"cube");
  cube_distance 
 ---------------
              0
 (1 row)
 
-SELECT cube_distance('(42,42,42,42)'::cube,'(137,137,137,137)'::cube);
+SELECT cube_distance('(42,42,42,42)'::"cube",'(137,137,137,137)'::"cube");
  cube_distance 
 ---------------
            190
 (1 row)
 
-SELECT cube_distance('(42,42,42)'::cube,'(137,137)'::cube);
+SELECT cube_distance('(42,42,42)'::"cube",'(137,137)'::"cube");
   cube_distance   
 ------------------
  140.762210837994
 (1 row)
 
--- Test of cube function (text to cube)
+-- Test of "cube" function (text to "cube")
 --
-SELECT cube('(1,1.2)'::text);
+SELECT "cube"('(1,1.2)'::text);
    cube   
 ----------
  (1, 1.2)
 (1 row)
 
-SELECT cube(NULL);
+SELECT "cube"(NULL);
  cube 
 ------
  
 (1 row)
 
--- Test of cube_dim function (dimensions stored in cube)
+-- Test of cube_dim function (dimensions stored in "cube")
 --
-SELECT cube_dim('(0)'::cube);
+SELECT cube_dim('(0)'::"cube");
  cube_dim 
 ----------
         1
 (1 row)
 
-SELECT cube_dim('(0,0)'::cube);
+SELECT cube_dim('(0,0)'::"cube");
  cube_dim 
 ----------
         2
 (1 row)
 
-SELECT cube_dim('(0,0,0)'::cube);
+SELECT cube_dim('(0,0,0)'::"cube");
  cube_dim 
 ----------
         3
 (1 row)
 
-SELECT cube_dim('(42,42,42),(42,42,42)'::cube);
+SELECT cube_dim('(42,42,42),(42,42,42)'::"cube");
  cube_dim 
 ----------
         3
 (1 row)
 
-SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::cube);
+SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::"cube");
  cube_dim 
 ----------
         5
@@ -1021,55 +1021,55 @@ SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::cube);
 
 -- Test of cube_ll_coord function (retrieves LL coodinate values)
 --
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 1);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 1);
  cube_ll_coord 
 ---------------
             -1
 (1 row)
 
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 2);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 2);
  cube_ll_coord 
 ---------------
             -2
 (1 row)
 
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 3);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 3);
  cube_ll_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 1);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 1);
  cube_ll_coord 
 ---------------
              1
 (1 row)
 
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 2);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 2);
  cube_ll_coord 
 ---------------
              2
 (1 row)
 
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 3);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 3);
  cube_ll_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ll_coord('(42,137)'::cube, 1);
+SELECT cube_ll_coord('(42,137)'::"cube", 1);
  cube_ll_coord 
 ---------------
             42
 (1 row)
 
-SELECT cube_ll_coord('(42,137)'::cube, 2);
+SELECT cube_ll_coord('(42,137)'::"cube", 2);
  cube_ll_coord 
 ---------------
            137
 (1 row)
 
-SELECT cube_ll_coord('(42,137)'::cube, 3);
+SELECT cube_ll_coord('(42,137)'::"cube", 3);
  cube_ll_coord 
 ---------------
              0
@@ -1077,55 +1077,55 @@ SELECT cube_ll_coord('(42,137)'::cube, 3);
 
 -- Test of cube_ur_coord function (retrieves UR coodinate values)
 --
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 1);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 1);
  cube_ur_coord 
 ---------------
              2
 (1 row)
 
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 2);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 2);
  cube_ur_coord 
 ---------------
              1
 (1 row)
 
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 3);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 3);
  cube_ur_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 1);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 1);
  cube_ur_coord 
 ---------------
              1
 (1 row)
 
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 2);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 2);
  cube_ur_coord 
 ---------------
              2
 (1 row)
 
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 3);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 3);
  cube_ur_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ur_coord('(42,137)'::cube, 1);
+SELECT cube_ur_coord('(42,137)'::"cube", 1);
  cube_ur_coord 
 ---------------
             42
 (1 row)
 
-SELECT cube_ur_coord('(42,137)'::cube, 2);
+SELECT cube_ur_coord('(42,137)'::"cube", 2);
  cube_ur_coord 
 ---------------
            137
 (1 row)
 
-SELECT cube_ur_coord('(42,137)'::cube, 3);
+SELECT cube_ur_coord('(42,137)'::"cube", 3);
  cube_ur_coord 
 ---------------
              0
@@ -1133,37 +1133,37 @@ SELECT cube_ur_coord('(42,137)'::cube, 3);
 
 -- Test of cube_is_point
 --
-SELECT cube_is_point('(0)'::cube);
+SELECT cube_is_point('(0)'::"cube");
  cube_is_point 
 ---------------
  t
 (1 row)
 
-SELECT cube_is_point('(0,1,2)'::cube);
+SELECT cube_is_point('(0,1,2)'::"cube");
  cube_is_point 
 ---------------
  t
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(0,1,2)'::cube);
+SELECT cube_is_point('(0,1,2),(0,1,2)'::"cube");
  cube_is_point 
 ---------------
  t
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(-1,1,2)'::cube);
+SELECT cube_is_point('(0,1,2),(-1,1,2)'::"cube");
  cube_is_point 
 ---------------
  f
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(0,-1,2)'::cube);
+SELECT cube_is_point('(0,1,2),(0,-1,2)'::"cube");
  cube_is_point 
 ---------------
  f
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(0,1,-2)'::cube);
+SELECT cube_is_point('(0,1,2),(0,1,-2)'::"cube");
  cube_is_point 
 ---------------
  f
@@ -1171,121 +1171,121 @@ SELECT cube_is_point('(0,1,2),(0,1,-2)'::cube);
 
 -- Test of cube_enlarge (enlarging and shrinking cubes)
 --
-SELECT cube_enlarge('(0)'::cube, 0, 0);
+SELECT cube_enlarge('(0)'::"cube", 0, 0);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 0, 1);
+SELECT cube_enlarge('(0)'::"cube", 0, 1);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 0, 2);
+SELECT cube_enlarge('(0)'::"cube", 0, 2);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(2),(-2)'::cube, 0, 4);
+SELECT cube_enlarge('(2),(-2)'::"cube", 0, 4);
  cube_enlarge 
 --------------
  (-2),(2)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 1, 0);
+SELECT cube_enlarge('(0)'::"cube", 1, 0);
  cube_enlarge 
 --------------
  (-1),(1)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 1, 1);
+SELECT cube_enlarge('(0)'::"cube", 1, 1);
  cube_enlarge 
 --------------
  (-1),(1)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 1, 2);
+SELECT cube_enlarge('(0)'::"cube", 1, 2);
   cube_enlarge   
 -----------------
  (-1, -1),(1, 1)
 (1 row)
 
-SELECT cube_enlarge('(2),(-2)'::cube, 1, 4);
+SELECT cube_enlarge('(2),(-2)'::"cube", 1, 4);
          cube_enlarge          
 -------------------------------
  (-3, -1, -1, -1),(3, 1, 1, 1)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, -1, 0);
+SELECT cube_enlarge('(0)'::"cube", -1, 0);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, -1, 1);
+SELECT cube_enlarge('(0)'::"cube", -1, 1);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, -1, 2);
+SELECT cube_enlarge('(0)'::"cube", -1, 2);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(2),(-2)'::cube, -1, 4);
+SELECT cube_enlarge('(2),(-2)'::"cube", -1, 4);
  cube_enlarge 
 --------------
  (-1),(1)
 (1 row)
 
-SELECT cube_enlarge('(0,0,0)'::cube, 1, 0);
+SELECT cube_enlarge('(0,0,0)'::"cube", 1, 0);
       cube_enlarge      
 ------------------------
  (-1, -1, -1),(1, 1, 1)
 (1 row)
 
-SELECT cube_enlarge('(0,0,0)'::cube, 1, 2);
+SELECT cube_enlarge('(0,0,0)'::"cube", 1, 2);
       cube_enlarge      
 ------------------------
  (-1, -1, -1),(1, 1, 1)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 1, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", 1, 2);
   cube_enlarge   
 -----------------
  (-4, -3),(3, 8)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 3, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", 3, 2);
    cube_enlarge   
 ------------------
  (-6, -5),(5, 10)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -1, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", -1, 2);
   cube_enlarge   
 -----------------
  (-2, -1),(1, 6)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", -3, 2);
     cube_enlarge     
 ---------------------
  (-0.5, 1),(-0.5, 4)
 (1 row)
 
-SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -23, 5);
+SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::"cube", -23, 5);
  cube_enlarge 
 --------------
  (42, 0, 0)
 (1 row)
 
-SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -24, 5);
+SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::"cube", -24, 5);
  cube_enlarge 
 --------------
  (42, 0, 0)
@@ -1293,31 +1293,31 @@ SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -24, 5);
 
 -- Test of cube_union (MBR for two cubes)
 --
-SELECT cube_union('(1,2),(3,4)'::cube, '(5,6,7),(8,9,10)'::cube);
+SELECT cube_union('(1,2),(3,4)'::"cube", '(5,6,7),(8,9,10)'::"cube");
       cube_union      
 ----------------------
  (1, 2, 0),(8, 9, 10)
 (1 row)
 
-SELECT cube_union('(1,2)'::cube, '(4,2,0,0)'::cube);
+SELECT cube_union('(1,2)'::"cube", '(4,2,0,0)'::"cube");
         cube_union         
 ---------------------------
  (1, 2, 0, 0),(4, 2, 0, 0)
 (1 row)
 
-SELECT cube_union('(1,2),(1,2)'::cube, '(4,2),(4,2)'::cube);
+SELECT cube_union('(1,2),(1,2)'::"cube", '(4,2),(4,2)'::"cube");
   cube_union   
 ---------------
  (1, 2),(4, 2)
 (1 row)
 
-SELECT cube_union('(1,2),(1,2)'::cube, '(1,2),(1,2)'::cube);
+SELECT cube_union('(1,2),(1,2)'::"cube", '(1,2),(1,2)'::"cube");
  cube_union 
 ------------
  (1, 2)
 (1 row)
 
-SELECT cube_union('(1,2),(1,2)'::cube, '(1,2,0),(1,2,0)'::cube);
+SELECT cube_union('(1,2),(1,2)'::"cube", '(1,2,0),(1,2,0)'::"cube");
  cube_union 
 ------------
  (1, 2, 0)
@@ -1325,43 +1325,43 @@ SELECT cube_union('(1,2),(1,2)'::cube, '(1,2,0),(1,2,0)'::cube);
 
 -- Test of cube_inter
 --
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,4), (16,15)'::cube); -- intersects
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,4), (16,15)'::"cube"); -- intersects
    cube_inter    
 -----------------
  (3, 4),(10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,4), (6,5)'::cube); -- includes
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,4), (6,5)'::"cube"); -- includes
   cube_inter   
 ---------------
  (3, 4),(6, 5)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(13,14), (16,15)'::cube); -- no intersection
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(13,14), (16,15)'::"cube"); -- no intersection
     cube_inter     
 -------------------
  (13, 14),(10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,14), (16,15)'::cube); -- no intersection, but one dimension intersects
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,14), (16,15)'::"cube"); -- no intersection, but one dimension intersects
     cube_inter    
 ------------------
  (3, 14),(10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(10,11), (16,15)'::cube); -- point intersection
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(10,11), (16,15)'::"cube"); -- point intersection
  cube_inter 
 ------------
  (10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2,3)'::cube, '(1,2,3)'::cube); -- point args
+SELECT cube_inter('(1,2,3)'::"cube", '(1,2,3)'::"cube"); -- point args
  cube_inter 
 ------------
  (1, 2, 3)
 (1 row)
 
-SELECT cube_inter('(1,2,3)'::cube, '(5,6,3)'::cube); -- point args
+SELECT cube_inter('(1,2,3)'::"cube", '(5,6,3)'::"cube"); -- point args
      cube_inter      
 ---------------------
  (5, 6, 3),(1, 2, 3)
@@ -1369,13 +1369,13 @@ SELECT cube_inter('(1,2,3)'::cube, '(5,6,3)'::cube); -- point args
 
 -- Test of cube_size
 --
-SELECT cube_size('(4,8),(15,16)'::cube);
+SELECT cube_size('(4,8),(15,16)'::"cube");
  cube_size 
 -----------
         88
 (1 row)
 
-SELECT cube_size('(42,137)'::cube);
+SELECT cube_size('(42,137)'::"cube");
  cube_size 
 -----------
          0
@@ -1383,7 +1383,7 @@ SELECT cube_size('(42,137)'::cube);
 
 -- Load some example data and build the index
 --
-CREATE TABLE test_cube (c cube);
+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)' ORDER BY c;
diff --git a/contrib/cube/expected/cube_1.out b/contrib/cube/expected/cube_1.out
index c07d61d..4f47c54 100644
--- a/contrib/cube/expected/cube_1.out
+++ b/contrib/cube/expected/cube_1.out
@@ -1,552 +1,552 @@
 --
 --  Test cube datatype
 --
-CREATE EXTENSION cube;
+CREATE EXTENSION "cube";
 --
 -- testing the input and output functions
 --
 -- Any number (a one-dimensional point)
-SELECT '1'::cube AS cube;
+SELECT '1'::"cube" AS "cube";
  cube 
 ------
  (1)
 (1 row)
 
-SELECT '-1'::cube AS cube;
+SELECT '-1'::"cube" AS "cube";
  cube 
 ------
  (-1)
 (1 row)
 
-SELECT '1.'::cube AS cube;
+SELECT '1.'::"cube" AS "cube";
  cube 
 ------
  (1)
 (1 row)
 
-SELECT '-1.'::cube AS cube;
+SELECT '-1.'::"cube" AS "cube";
  cube 
 ------
  (-1)
 (1 row)
 
-SELECT '.1'::cube AS cube;
+SELECT '.1'::"cube" AS "cube";
  cube  
 -------
  (0.1)
 (1 row)
 
-SELECT '-.1'::cube AS cube;
+SELECT '-.1'::"cube" AS "cube";
   cube  
 --------
  (-0.1)
 (1 row)
 
-SELECT '1.0'::cube AS cube;
+SELECT '1.0'::"cube" AS "cube";
  cube 
 ------
  (1)
 (1 row)
 
-SELECT '-1.0'::cube AS cube;
+SELECT '-1.0'::"cube" AS "cube";
  cube 
 ------
  (-1)
 (1 row)
 
-SELECT '1e27'::cube AS cube;
+SELECT '1e27'::"cube" AS "cube";
   cube   
 ---------
  (1e+27)
 (1 row)
 
-SELECT '-1e27'::cube AS cube;
+SELECT '-1e27'::"cube" AS "cube";
    cube   
 ----------
  (-1e+27)
 (1 row)
 
-SELECT '1.0e27'::cube AS cube;
+SELECT '1.0e27'::"cube" AS "cube";
   cube   
 ---------
  (1e+27)
 (1 row)
 
-SELECT '-1.0e27'::cube AS cube;
+SELECT '-1.0e27'::"cube" AS "cube";
    cube   
 ----------
  (-1e+27)
 (1 row)
 
-SELECT '1e+27'::cube AS cube;
+SELECT '1e+27'::"cube" AS "cube";
   cube   
 ---------
  (1e+27)
 (1 row)
 
-SELECT '-1e+27'::cube AS cube;
+SELECT '-1e+27'::"cube" AS "cube";
    cube   
 ----------
  (-1e+27)
 (1 row)
 
-SELECT '1.0e+27'::cube AS cube;
+SELECT '1.0e+27'::"cube" AS "cube";
   cube   
 ---------
  (1e+27)
 (1 row)
 
-SELECT '-1.0e+27'::cube AS cube;
+SELECT '-1.0e+27'::"cube" AS "cube";
    cube   
 ----------
  (-1e+27)
 (1 row)
 
-SELECT '1e-7'::cube AS cube;
+SELECT '1e-7'::"cube" AS "cube";
   cube   
 ---------
  (1e-07)
 (1 row)
 
-SELECT '-1e-7'::cube AS cube;
+SELECT '-1e-7'::"cube" AS "cube";
    cube   
 ----------
  (-1e-07)
 (1 row)
 
-SELECT '1.0e-7'::cube AS cube;
+SELECT '1.0e-7'::"cube" AS "cube";
   cube   
 ---------
  (1e-07)
 (1 row)
 
-SELECT '-1.0e-7'::cube AS cube;
+SELECT '-1.0e-7'::"cube" AS "cube";
    cube   
 ----------
  (-1e-07)
 (1 row)
 
-SELECT '1e-700'::cube AS cube;
+SELECT '1e-700'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '-1e-700'::cube AS cube;
+SELECT '-1e-700'::"cube" AS "cube";
  cube 
 ------
  (-0)
 (1 row)
 
-SELECT '1234567890123456'::cube AS cube;
+SELECT '1234567890123456'::"cube" AS "cube";
           cube          
 ------------------------
  (1.23456789012346e+15)
 (1 row)
 
-SELECT '+1234567890123456'::cube AS cube;
+SELECT '+1234567890123456'::"cube" AS "cube";
           cube          
 ------------------------
  (1.23456789012346e+15)
 (1 row)
 
-SELECT '-1234567890123456'::cube AS cube;
+SELECT '-1234567890123456'::"cube" AS "cube";
           cube           
 -------------------------
  (-1.23456789012346e+15)
 (1 row)
 
-SELECT '.1234567890123456'::cube AS cube;
+SELECT '.1234567890123456'::"cube" AS "cube";
         cube         
 ---------------------
  (0.123456789012346)
 (1 row)
 
-SELECT '+.1234567890123456'::cube AS cube;
+SELECT '+.1234567890123456'::"cube" AS "cube";
         cube         
 ---------------------
  (0.123456789012346)
 (1 row)
 
-SELECT '-.1234567890123456'::cube AS cube;
+SELECT '-.1234567890123456'::"cube" AS "cube";
          cube         
 ----------------------
  (-0.123456789012346)
 (1 row)
 
 -- simple lists (points)
-SELECT '1,2'::cube AS cube;
+SELECT '1,2'::"cube" AS "cube";
   cube  
 --------
  (1, 2)
 (1 row)
 
-SELECT '(1,2)'::cube AS cube;
+SELECT '(1,2)'::"cube" AS "cube";
   cube  
 --------
  (1, 2)
 (1 row)
 
-SELECT '1,2,3,4,5'::cube AS cube;
+SELECT '1,2,3,4,5'::"cube" AS "cube";
       cube       
 -----------------
  (1, 2, 3, 4, 5)
 (1 row)
 
-SELECT '(1,2,3,4,5)'::cube AS cube;
+SELECT '(1,2,3,4,5)'::"cube" AS "cube";
       cube       
 -----------------
  (1, 2, 3, 4, 5)
 (1 row)
 
 -- double lists (cubes)
-SELECT '(0),(0)'::cube AS cube;
+SELECT '(0),(0)'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '(0),(1)'::cube AS cube;
+SELECT '(0),(1)'::"cube" AS "cube";
   cube   
 ---------
  (0),(1)
 (1 row)
 
-SELECT '[(0),(0)]'::cube AS cube;
+SELECT '[(0),(0)]'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '[(0),(1)]'::cube AS cube;
+SELECT '[(0),(1)]'::"cube" AS "cube";
   cube   
 ---------
  (0),(1)
 (1 row)
 
-SELECT '(0,0,0,0),(0,0,0,0)'::cube AS cube;
+SELECT '(0,0,0,0),(0,0,0,0)'::"cube" AS "cube";
      cube     
 --------------
  (0, 0, 0, 0)
 (1 row)
 
-SELECT '(0,0,0,0),(1,0,0,0)'::cube AS cube;
+SELECT '(0,0,0,0),(1,0,0,0)'::"cube" AS "cube";
            cube            
 ---------------------------
  (0, 0, 0, 0),(1, 0, 0, 0)
 (1 row)
 
-SELECT '[(0,0,0,0),(0,0,0,0)]'::cube AS cube;
+SELECT '[(0,0,0,0),(0,0,0,0)]'::"cube" AS "cube";
      cube     
 --------------
  (0, 0, 0, 0)
 (1 row)
 
-SELECT '[(0,0,0,0),(1,0,0,0)]'::cube AS cube;
+SELECT '[(0,0,0,0),(1,0,0,0)]'::"cube" AS "cube";
            cube            
 ---------------------------
  (0, 0, 0, 0),(1, 0, 0, 0)
 (1 row)
 
 -- invalid input: parse errors
-SELECT ''::cube AS cube;
+SELECT ''::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT ''::cube AS cube;
+LINE 1: SELECT ''::"cube" AS "cube";
                ^
 DETAIL:  syntax error at end of input
-SELECT 'ABC'::cube AS cube;
+SELECT 'ABC'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT 'ABC'::cube AS cube;
+LINE 1: SELECT 'ABC'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "A"
-SELECT '()'::cube AS cube;
+SELECT '()'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '()'::cube AS cube;
+LINE 1: SELECT '()'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '[]'::cube AS cube;
+SELECT '[]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[]'::cube AS cube;
+LINE 1: SELECT '[]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "]"
-SELECT '[()]'::cube AS cube;
+SELECT '[()]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[()]'::cube AS cube;
+LINE 1: SELECT '[()]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '[(1)]'::cube AS cube;
+SELECT '[(1)]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1)]'::cube AS cube;
+LINE 1: SELECT '[(1)]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "]"
-SELECT '[(1),]'::cube AS cube;
+SELECT '[(1),]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),]'::cube AS cube;
+LINE 1: SELECT '[(1),]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "]"
-SELECT '[(1),2]'::cube AS cube;
+SELECT '[(1),2]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),2]'::cube AS cube;
+LINE 1: SELECT '[(1),2]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "2"
-SELECT '[(1),(2),(3)]'::cube AS cube;
+SELECT '[(1),(2),(3)]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),(2),(3)]'::cube AS cube;
+LINE 1: SELECT '[(1),(2),(3)]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '1,'::cube AS cube;
+SELECT '1,'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '1,'::cube AS cube;
+LINE 1: SELECT '1,'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at end of input
-SELECT '1,2,'::cube AS cube;
+SELECT '1,2,'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '1,2,'::cube AS cube;
+LINE 1: SELECT '1,2,'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at end of input
-SELECT '1,,2'::cube AS cube;
+SELECT '1,,2'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '1,,2'::cube AS cube;
+LINE 1: SELECT '1,,2'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '(1,)'::cube AS cube;
+SELECT '(1,)'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,)'::cube AS cube;
+LINE 1: SELECT '(1,)'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '(1,2,)'::cube AS cube;
+SELECT '(1,2,)'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,)'::cube AS cube;
+LINE 1: SELECT '(1,2,)'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '(1,,2)'::cube AS cube;
+SELECT '(1,,2)'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,,2)'::cube AS cube;
+LINE 1: SELECT '(1,,2)'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
 -- invalid input: semantic errors and trailing garbage
-SELECT '[(1),(2)],'::cube AS cube; -- 0
+SELECT '[(1),(2)],'::"cube" AS "cube"; -- 0
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),(2)],'::cube AS cube;
+LINE 1: SELECT '[(1),(2)],'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '[(1,2,3),(2,3)]'::cube AS cube; -- 1
+SELECT '[(1,2,3),(2,3)]'::"cube" AS "cube"; -- 1
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1,2,3),(2,3)]'::cube AS cube;
+LINE 1: SELECT '[(1,2,3),(2,3)]'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2,3) and (2,3).
-SELECT '[(1,2),(1,2,3)]'::cube AS cube; -- 1
+SELECT '[(1,2),(1,2,3)]'::"cube" AS "cube"; -- 1
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1,2),(1,2,3)]'::cube AS cube;
+LINE 1: SELECT '[(1,2),(1,2,3)]'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2) and (1,2,3).
-SELECT '(1),(2),'::cube AS cube; -- 2
+SELECT '(1),(2),'::"cube" AS "cube"; -- 2
 ERROR:  bad cube representation
-LINE 1: SELECT '(1),(2),'::cube AS cube;
+LINE 1: SELECT '(1),(2),'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
+SELECT '(1,2,3),(2,3)'::"cube" AS "cube"; -- 3
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,3),(2,3)'::cube AS cube;
+LINE 1: SELECT '(1,2,3),(2,3)'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2,3) and (2,3).
-SELECT '(1,2),(1,2,3)'::cube AS cube; -- 3
+SELECT '(1,2),(1,2,3)'::"cube" AS "cube"; -- 3
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2),(1,2,3)'::cube AS cube;
+LINE 1: SELECT '(1,2),(1,2,3)'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2) and (1,2,3).
-SELECT '(1,2,3)ab'::cube AS cube; -- 4
+SELECT '(1,2,3)ab'::"cube" AS "cube"; -- 4
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,3)ab'::cube AS cube;
+LINE 1: SELECT '(1,2,3)ab'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '(1,2,3)a'::cube AS cube; -- 5
+SELECT '(1,2,3)a'::"cube" AS "cube"; -- 5
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,3)a'::cube AS cube;
+LINE 1: SELECT '(1,2,3)a'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '(1,2)('::cube AS cube; -- 5
+SELECT '(1,2)('::"cube" AS "cube"; -- 5
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2)('::cube AS cube;
+LINE 1: SELECT '(1,2)('::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "("
-SELECT '1,2ab'::cube AS cube; -- 6
+SELECT '1,2ab'::"cube" AS "cube"; -- 6
 ERROR:  bad cube representation
-LINE 1: SELECT '1,2ab'::cube AS cube;
+LINE 1: SELECT '1,2ab'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '1 e7'::cube AS cube; -- 6
+SELECT '1 e7'::"cube" AS "cube"; -- 6
 ERROR:  bad cube representation
-LINE 1: SELECT '1 e7'::cube AS cube;
+LINE 1: SELECT '1 e7'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "e"
-SELECT '1,2a'::cube AS cube; -- 7
+SELECT '1,2a'::"cube" AS "cube"; -- 7
 ERROR:  bad cube representation
-LINE 1: SELECT '1,2a'::cube AS cube;
+LINE 1: SELECT '1,2a'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '1..2'::cube AS cube; -- 7
+SELECT '1..2'::"cube" AS "cube"; -- 7
 ERROR:  bad cube representation
-LINE 1: SELECT '1..2'::cube AS cube;
+LINE 1: SELECT '1..2'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ".2"
 --
 -- Testing building cubes from float8 values
 --
-SELECT cube(0::float8);
+SELECT "cube"(0::float8);
  cube 
 ------
  (0)
 (1 row)
 
-SELECT cube(1::float8);
+SELECT "cube"(1::float8);
  cube 
 ------
  (1)
 (1 row)
 
-SELECT cube(1,2);
+SELECT "cube"(1,2);
   cube   
 ---------
  (1),(2)
 (1 row)
 
-SELECT cube(cube(1,2),3);
+SELECT "cube"("cube"(1,2),3);
      cube      
 ---------------
  (1, 3),(2, 3)
 (1 row)
 
-SELECT cube(cube(1,2),3,4);
+SELECT "cube"("cube"(1,2),3,4);
      cube      
 ---------------
  (1, 3),(2, 4)
 (1 row)
 
-SELECT cube(cube(cube(1,2),3,4),5);
+SELECT "cube"("cube"("cube"(1,2),3,4),5);
         cube         
 ---------------------
  (1, 3, 5),(2, 4, 5)
 (1 row)
 
-SELECT cube(cube(cube(1,2),3,4),5,6);
+SELECT "cube"("cube"("cube"(1,2),3,4),5,6);
         cube         
 ---------------------
  (1, 3, 5),(2, 4, 6)
 (1 row)
 
 --
--- Test that the text -> cube cast was installed.
+-- Test that the text -> "cube" cast was installed.
 --
-SELECT '(0)'::text::cube;
+SELECT '(0)'::text::"cube";
  cube 
 ------
  (0)
 (1 row)
 
 --
--- Test the float[] -> cube cast
+-- Test the float[] -> "cube" cast
 --
-SELECT cube('{0,1,2}'::float[], '{3,4,5}'::float[]);
+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[]);
+SELECT "cube"('{0,1,2}'::float[], '{3}'::float[]);
 ERROR:  UR and LL arrays must be of same length
-SELECT cube(NULL::float[], '{3}'::float[]);
+SELECT "cube"(NULL::float[], '{3}'::float[]);
  cube 
 ------
  
 (1 row)
 
-SELECT cube('{0,1,2}'::float[]);
+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]);
+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),(1,3,5)'), ARRAY[3,2,1,1]);
+SELECT cube_subset("cube"('(1,3,5),(1,3,5)'), ARRAY[3,2,1,1]);
  cube_subset  
 --------------
  (5, 3, 1, 1)
 (1 row)
 
-SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
+SELECT cube_subset("cube"('(1,3,5),(6,7,8)'), ARRAY[4,0]);
 ERROR:  Index out of bounds
-SELECT cube_subset(cube('(6,7,8),(6,7,8)'), ARRAY[4,0]);
+SELECT cube_subset("cube"('(6,7,8),(6,7,8)'), ARRAY[4,0]);
 ERROR:  Index out of bounds
 --
 -- Test point processing
 --
-SELECT cube('(1,2),(1,2)'); -- cube_in
+SELECT "cube"('(1,2),(1,2)'); -- cube_in
   cube  
 --------
  (1, 2)
 (1 row)
 
-SELECT cube('{0,1,2}'::float[], '{0,1,2}'::float[]); -- cube_a_f8_f8
+SELECT "cube"('{0,1,2}'::float[], '{0,1,2}'::float[]); -- cube_a_f8_f8
    cube    
 -----------
  (0, 1, 2)
 (1 row)
 
-SELECT cube('{5,6,7,8}'::float[]); -- cube_a_f8
+SELECT "cube"('{5,6,7,8}'::float[]); -- cube_a_f8
      cube     
 --------------
  (5, 6, 7, 8)
 (1 row)
 
-SELECT cube(1.37); -- cube_f8
+SELECT "cube"(1.37); -- cube_f8
   cube  
 --------
  (1.37)
 (1 row)
 
-SELECT cube(1.37, 1.37); -- cube_f8_f8
+SELECT "cube"(1.37, 1.37); -- cube_f8_f8
   cube  
 --------
  (1.37)
 (1 row)
 
-SELECT cube(cube(1,1), 42); -- cube_c_f8
+SELECT "cube"("cube"(1,1), 42); -- cube_c_f8
   cube   
 ---------
  (1, 42)
 (1 row)
 
-SELECT cube(cube(1,2), 42); -- cube_c_f8
+SELECT "cube"("cube"(1,2), 42); -- cube_c_f8
       cube       
 -----------------
  (1, 42),(2, 42)
 (1 row)
 
-SELECT cube(cube(1,1), 42, 42); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,1), 42, 42); -- cube_c_f8_f8
   cube   
 ---------
  (1, 42)
 (1 row)
 
-SELECT cube(cube(1,1), 42, 24); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,1), 42, 24); -- cube_c_f8_f8
       cube       
 -----------------
  (1, 42),(1, 24)
 (1 row)
 
-SELECT cube(cube(1,2), 42, 42); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,2), 42, 42); -- cube_c_f8_f8
       cube       
 -----------------
  (1, 42),(2, 42)
 (1 row)
 
-SELECT cube(cube(1,2), 42, 24); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,2), 42, 24); -- cube_c_f8_f8
       cube       
 -----------------
  (1, 42),(2, 24)
@@ -555,12 +555,12 @@ SELECT cube(cube(1,2), 42, 24); -- cube_c_f8_f8
 --
 -- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
 --
-select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::cube;
+select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::"cube";
 ERROR:  bad cube representation
 LINE 1: select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...
                ^
 DETAIL:  A cube cannot have more than 100 dimensions.
-select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::cube;
+select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::"cube";
 ERROR:  bad cube representation
 LINE 1: select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...
                ^
@@ -570,37 +570,37 @@ DETAIL:  A cube cannot have more than 100 dimensions.
 --
 -- equality/inequality:
 --
-SELECT '24, 33.20'::cube    =  '24, 33.20'::cube AS bool;
+SELECT '24, 33.20'::"cube"    =  '24, 33.20'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '24, 33.20'::cube    != '24, 33.20'::cube AS bool;
+SELECT '24, 33.20'::"cube"    != '24, 33.20'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '24, 33.20'::cube    =  '24, 33.21'::cube AS bool;
+SELECT '24, 33.20'::"cube"    =  '24, 33.21'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '24, 33.20'::cube    != '24, 33.21'::cube AS bool;
+SELECT '24, 33.20'::"cube"    != '24, 33.21'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"  =  '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"  =  '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
  bool 
 ------
  f
@@ -609,97 +609,97 @@ SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
 -- "lower than" / "greater than"
 -- (these operators are not useful for anything but ordering)
 --
-SELECT '1'::cube   > '2'::cube AS bool;
+SELECT '1'::"cube"   > '2'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '1'::cube   < '2'::cube AS bool;
+SELECT '1'::"cube"   < '2'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '1,1'::cube > '1,2'::cube AS bool;
+SELECT '1,1'::"cube" > '1,2'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '1,1'::cube < '1,2'::cube AS bool;
+SELECT '1,1'::"cube" < '1,2'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,1),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,1),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,1),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,1),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,1)'::cube > '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,1)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,1)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,1)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0,0,0,1),(3,1,0,0,0)'::cube > '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,1),(3,1,0,0,0)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,1),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,1),(3,1,0,0,0)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube > '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,0)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,0)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  f
@@ -707,235 +707,235 @@ SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
 
 -- "overlap"
 --
-SELECT '1'::cube && '1'::cube AS bool;
+SELECT '1'::"cube" && '1'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '1'::cube && '2'::cube AS bool;
+SELECT '1'::"cube" && '2'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '0'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '0'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '1'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '1'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '1,1,1'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '1,1,1'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(1,1,1),(2,2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(1,1,1),(2,2,2)]'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(1,1),(2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(1,1),(2,2)]'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(2,1,1),(2,2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(2,1,1),(2,2,2)]'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
--- "contained in" (the left operand is the cube entirely enclosed by
+-- "contained in" (the left operand is the "cube" entirely enclosed by
 -- the right operand):
 --
-SELECT '0'::cube                 <@ '0'::cube                        AS bool;
+SELECT '0'::"cube"                 <@ '0'::"cube"                        AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,0'::cube             <@ '0,0,0'::cube                    AS bool;
+SELECT '0,0,0'::"cube"             <@ '0,0,0'::"cube"                    AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0'::cube               <@ '0,0,1'::cube                    AS bool;
+SELECT '0,0'::"cube"               <@ '0,0,1'::"cube"                    AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,0'::cube             <@ '0,0,1'::cube                    AS bool;
+SELECT '0,0,0'::"cube"             <@ '0,0,1'::"cube"                    AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '1,0,0'::cube             <@ '0,0,1'::cube                    AS bool;
+SELECT '1,0,0'::"cube"             <@ '0,0,1'::"cube"                    AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(1,0,0),(0,0,1)'::cube          AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(1,0,0),(0,0,1)'::"cube"          AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(-1,-1,-1),(1,1,1)'::cube       AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(-1,-1,-1),(1,1,1)'::"cube"       AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(-1,-1,-1,-1),(1,1,1,1)'::cube  AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(-1,-1,-1,-1),(1,1,1,1)'::"cube"  AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0'::cube                 <@ '(-1),(1)'::cube                 AS bool;
+SELECT '0'::"cube"                 <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '1'::cube                 <@ '(-1),(1)'::cube                 AS bool;
+SELECT '1'::"cube"                 <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '-1'::cube                <@ '(-1),(1)'::cube                 AS bool;
+SELECT '-1'::"cube"                <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube          <@ '(-1),(1)'::cube                 AS bool;
+SELECT '(-1),(1)'::"cube"          <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube          <@ '(-1,-1),(1,1)'::cube            AS bool;
+SELECT '(-1),(1)'::"cube"          <@ '(-1,-1),(1,1)'::"cube"            AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-2),(1)'::cube          <@ '(-1),(1)'::cube                 AS bool;
+SELECT '(-2),(1)'::"cube"          <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(-2),(1)'::cube          <@ '(-1,-1),(1,1)'::cube            AS bool;
+SELECT '(-2),(1)'::"cube"          <@ '(-1,-1),(1,1)'::"cube"            AS bool;
  bool 
 ------
  f
 (1 row)
 
--- "contains" (the left operand is the cube that entirely encloses the
+-- "contains" (the left operand is the "cube" that entirely encloses the
 -- right operand)
 --
-SELECT '0'::cube                        @> '0'::cube                 AS bool;
+SELECT '0'::"cube"                        @> '0'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,0'::cube                    @> '0,0,0'::cube             AS bool;
+SELECT '0,0,0'::"cube"                    @> '0,0,0'::"cube"             AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,1'::cube                    @> '0,0'::cube               AS bool;
+SELECT '0,0,1'::"cube"                    @> '0,0'::"cube"               AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,1'::cube                    @> '0,0,0'::cube             AS bool;
+SELECT '0,0,1'::"cube"                    @> '0,0,0'::"cube"             AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '0,0,1'::cube                    @> '1,0,0'::cube             AS bool;
+SELECT '0,0,1'::"cube"                    @> '1,0,0'::"cube"             AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube          @> '(1,0,0),(0,0,1)'::cube   AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"          @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1,-1,-1),(1,1,1)'::cube       @> '(1,0,0),(0,0,1)'::cube   AS bool;
+SELECT '(-1,-1,-1),(1,1,1)'::"cube"       @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1,-1,-1,-1),(1,1,1,1)'::cube  @> '(1,0,0),(0,0,1)'::cube   AS bool;
+SELECT '(-1,-1,-1,-1),(1,1,1,1)'::"cube"  @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '0'::cube                 AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '0'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '1'::cube                 AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '1'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '-1'::cube                AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '-1'::"cube"                AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '(-1),(1)'::cube          AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '(-1),(1)'::"cube"          AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1,-1),(1,1)'::cube            @> '(-1),(1)'::cube          AS bool;
+SELECT '(-1,-1),(1,1)'::"cube"            @> '(-1),(1)'::"cube"          AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '(-2),(1)'::cube          AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '(-2),(1)'::"cube"          AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(-1,-1),(1,1)'::cube            @> '(-2),(1)'::cube          AS bool;
+SELECT '(-1,-1),(1,1)'::"cube"            @> '(-2),(1)'::"cube"          AS bool;
  bool 
 ------
  f
@@ -943,77 +943,77 @@ SELECT '(-1,-1),(1,1)'::cube            @> '(-2),(1)'::cube          AS bool;
 
 -- Test of distance function
 --
-SELECT cube_distance('(0)'::cube,'(2,2,2,2)'::cube);
+SELECT cube_distance('(0)'::"cube",'(2,2,2,2)'::"cube");
  cube_distance 
 ---------------
              4
 (1 row)
 
-SELECT cube_distance('(0)'::cube,'(.3,.4)'::cube);
+SELECT cube_distance('(0)'::"cube",'(.3,.4)'::"cube");
  cube_distance 
 ---------------
            0.5
 (1 row)
 
-SELECT cube_distance('(2,3,4)'::cube,'(2,3,4)'::cube);
+SELECT cube_distance('(2,3,4)'::"cube",'(2,3,4)'::"cube");
  cube_distance 
 ---------------
              0
 (1 row)
 
-SELECT cube_distance('(42,42,42,42)'::cube,'(137,137,137,137)'::cube);
+SELECT cube_distance('(42,42,42,42)'::"cube",'(137,137,137,137)'::"cube");
  cube_distance 
 ---------------
            190
 (1 row)
 
-SELECT cube_distance('(42,42,42)'::cube,'(137,137)'::cube);
+SELECT cube_distance('(42,42,42)'::"cube",'(137,137)'::"cube");
   cube_distance   
 ------------------
  140.762210837994
 (1 row)
 
--- Test of cube function (text to cube)
+-- Test of "cube" function (text to "cube")
 --
-SELECT cube('(1,1.2)'::text);
+SELECT "cube"('(1,1.2)'::text);
    cube   
 ----------
  (1, 1.2)
 (1 row)
 
-SELECT cube(NULL);
+SELECT "cube"(NULL);
  cube 
 ------
  
 (1 row)
 
--- Test of cube_dim function (dimensions stored in cube)
+-- Test of cube_dim function (dimensions stored in "cube")
 --
-SELECT cube_dim('(0)'::cube);
+SELECT cube_dim('(0)'::"cube");
  cube_dim 
 ----------
         1
 (1 row)
 
-SELECT cube_dim('(0,0)'::cube);
+SELECT cube_dim('(0,0)'::"cube");
  cube_dim 
 ----------
         2
 (1 row)
 
-SELECT cube_dim('(0,0,0)'::cube);
+SELECT cube_dim('(0,0,0)'::"cube");
  cube_dim 
 ----------
         3
 (1 row)
 
-SELECT cube_dim('(42,42,42),(42,42,42)'::cube);
+SELECT cube_dim('(42,42,42),(42,42,42)'::"cube");
  cube_dim 
 ----------
         3
 (1 row)
 
-SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::cube);
+SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::"cube");
  cube_dim 
 ----------
         5
@@ -1021,55 +1021,55 @@ SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::cube);
 
 -- Test of cube_ll_coord function (retrieves LL coodinate values)
 --
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 1);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 1);
  cube_ll_coord 
 ---------------
             -1
 (1 row)
 
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 2);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 2);
  cube_ll_coord 
 ---------------
             -2
 (1 row)
 
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 3);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 3);
  cube_ll_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 1);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 1);
  cube_ll_coord 
 ---------------
              1
 (1 row)
 
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 2);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 2);
  cube_ll_coord 
 ---------------
              2
 (1 row)
 
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 3);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 3);
  cube_ll_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ll_coord('(42,137)'::cube, 1);
+SELECT cube_ll_coord('(42,137)'::"cube", 1);
  cube_ll_coord 
 ---------------
             42
 (1 row)
 
-SELECT cube_ll_coord('(42,137)'::cube, 2);
+SELECT cube_ll_coord('(42,137)'::"cube", 2);
  cube_ll_coord 
 ---------------
            137
 (1 row)
 
-SELECT cube_ll_coord('(42,137)'::cube, 3);
+SELECT cube_ll_coord('(42,137)'::"cube", 3);
  cube_ll_coord 
 ---------------
              0
@@ -1077,55 +1077,55 @@ SELECT cube_ll_coord('(42,137)'::cube, 3);
 
 -- Test of cube_ur_coord function (retrieves UR coodinate values)
 --
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 1);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 1);
  cube_ur_coord 
 ---------------
              2
 (1 row)
 
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 2);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 2);
  cube_ur_coord 
 ---------------
              1
 (1 row)
 
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 3);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 3);
  cube_ur_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 1);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 1);
  cube_ur_coord 
 ---------------
              1
 (1 row)
 
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 2);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 2);
  cube_ur_coord 
 ---------------
              2
 (1 row)
 
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 3);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 3);
  cube_ur_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ur_coord('(42,137)'::cube, 1);
+SELECT cube_ur_coord('(42,137)'::"cube", 1);
  cube_ur_coord 
 ---------------
             42
 (1 row)
 
-SELECT cube_ur_coord('(42,137)'::cube, 2);
+SELECT cube_ur_coord('(42,137)'::"cube", 2);
  cube_ur_coord 
 ---------------
            137
 (1 row)
 
-SELECT cube_ur_coord('(42,137)'::cube, 3);
+SELECT cube_ur_coord('(42,137)'::"cube", 3);
  cube_ur_coord 
 ---------------
              0
@@ -1133,37 +1133,37 @@ SELECT cube_ur_coord('(42,137)'::cube, 3);
 
 -- Test of cube_is_point
 --
-SELECT cube_is_point('(0)'::cube);
+SELECT cube_is_point('(0)'::"cube");
  cube_is_point 
 ---------------
  t
 (1 row)
 
-SELECT cube_is_point('(0,1,2)'::cube);
+SELECT cube_is_point('(0,1,2)'::"cube");
  cube_is_point 
 ---------------
  t
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(0,1,2)'::cube);
+SELECT cube_is_point('(0,1,2),(0,1,2)'::"cube");
  cube_is_point 
 ---------------
  t
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(-1,1,2)'::cube);
+SELECT cube_is_point('(0,1,2),(-1,1,2)'::"cube");
  cube_is_point 
 ---------------
  f
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(0,-1,2)'::cube);
+SELECT cube_is_point('(0,1,2),(0,-1,2)'::"cube");
  cube_is_point 
 ---------------
  f
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(0,1,-2)'::cube);
+SELECT cube_is_point('(0,1,2),(0,1,-2)'::"cube");
  cube_is_point 
 ---------------
  f
@@ -1171,121 +1171,121 @@ SELECT cube_is_point('(0,1,2),(0,1,-2)'::cube);
 
 -- Test of cube_enlarge (enlarging and shrinking cubes)
 --
-SELECT cube_enlarge('(0)'::cube, 0, 0);
+SELECT cube_enlarge('(0)'::"cube", 0, 0);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 0, 1);
+SELECT cube_enlarge('(0)'::"cube", 0, 1);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 0, 2);
+SELECT cube_enlarge('(0)'::"cube", 0, 2);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(2),(-2)'::cube, 0, 4);
+SELECT cube_enlarge('(2),(-2)'::"cube", 0, 4);
  cube_enlarge 
 --------------
  (-2),(2)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 1, 0);
+SELECT cube_enlarge('(0)'::"cube", 1, 0);
  cube_enlarge 
 --------------
  (-1),(1)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 1, 1);
+SELECT cube_enlarge('(0)'::"cube", 1, 1);
  cube_enlarge 
 --------------
  (-1),(1)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 1, 2);
+SELECT cube_enlarge('(0)'::"cube", 1, 2);
   cube_enlarge   
 -----------------
  (-1, -1),(1, 1)
 (1 row)
 
-SELECT cube_enlarge('(2),(-2)'::cube, 1, 4);
+SELECT cube_enlarge('(2),(-2)'::"cube", 1, 4);
          cube_enlarge          
 -------------------------------
  (-3, -1, -1, -1),(3, 1, 1, 1)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, -1, 0);
+SELECT cube_enlarge('(0)'::"cube", -1, 0);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, -1, 1);
+SELECT cube_enlarge('(0)'::"cube", -1, 1);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, -1, 2);
+SELECT cube_enlarge('(0)'::"cube", -1, 2);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(2),(-2)'::cube, -1, 4);
+SELECT cube_enlarge('(2),(-2)'::"cube", -1, 4);
  cube_enlarge 
 --------------
  (-1),(1)
 (1 row)
 
-SELECT cube_enlarge('(0,0,0)'::cube, 1, 0);
+SELECT cube_enlarge('(0,0,0)'::"cube", 1, 0);
       cube_enlarge      
 ------------------------
  (-1, -1, -1),(1, 1, 1)
 (1 row)
 
-SELECT cube_enlarge('(0,0,0)'::cube, 1, 2);
+SELECT cube_enlarge('(0,0,0)'::"cube", 1, 2);
       cube_enlarge      
 ------------------------
  (-1, -1, -1),(1, 1, 1)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 1, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", 1, 2);
   cube_enlarge   
 -----------------
  (-4, -3),(3, 8)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 3, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", 3, 2);
    cube_enlarge   
 ------------------
  (-6, -5),(5, 10)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -1, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", -1, 2);
   cube_enlarge   
 -----------------
  (-2, -1),(1, 6)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", -3, 2);
     cube_enlarge     
 ---------------------
  (-0.5, 1),(-0.5, 4)
 (1 row)
 
-SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -23, 5);
+SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::"cube", -23, 5);
  cube_enlarge 
 --------------
  (42, 0, 0)
 (1 row)
 
-SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -24, 5);
+SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::"cube", -24, 5);
  cube_enlarge 
 --------------
  (42, 0, 0)
@@ -1293,31 +1293,31 @@ SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -24, 5);
 
 -- Test of cube_union (MBR for two cubes)
 --
-SELECT cube_union('(1,2),(3,4)'::cube, '(5,6,7),(8,9,10)'::cube);
+SELECT cube_union('(1,2),(3,4)'::"cube", '(5,6,7),(8,9,10)'::"cube");
       cube_union      
 ----------------------
  (1, 2, 0),(8, 9, 10)
 (1 row)
 
-SELECT cube_union('(1,2)'::cube, '(4,2,0,0)'::cube);
+SELECT cube_union('(1,2)'::"cube", '(4,2,0,0)'::"cube");
         cube_union         
 ---------------------------
  (1, 2, 0, 0),(4, 2, 0, 0)
 (1 row)
 
-SELECT cube_union('(1,2),(1,2)'::cube, '(4,2),(4,2)'::cube);
+SELECT cube_union('(1,2),(1,2)'::"cube", '(4,2),(4,2)'::"cube");
   cube_union   
 ---------------
  (1, 2),(4, 2)
 (1 row)
 
-SELECT cube_union('(1,2),(1,2)'::cube, '(1,2),(1,2)'::cube);
+SELECT cube_union('(1,2),(1,2)'::"cube", '(1,2),(1,2)'::"cube");
  cube_union 
 ------------
  (1, 2)
 (1 row)
 
-SELECT cube_union('(1,2),(1,2)'::cube, '(1,2,0),(1,2,0)'::cube);
+SELECT cube_union('(1,2),(1,2)'::"cube", '(1,2,0),(1,2,0)'::"cube");
  cube_union 
 ------------
  (1, 2, 0)
@@ -1325,43 +1325,43 @@ SELECT cube_union('(1,2),(1,2)'::cube, '(1,2,0),(1,2,0)'::cube);
 
 -- Test of cube_inter
 --
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,4), (16,15)'::cube); -- intersects
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,4), (16,15)'::"cube"); -- intersects
    cube_inter    
 -----------------
  (3, 4),(10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,4), (6,5)'::cube); -- includes
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,4), (6,5)'::"cube"); -- includes
   cube_inter   
 ---------------
  (3, 4),(6, 5)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(13,14), (16,15)'::cube); -- no intersection
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(13,14), (16,15)'::"cube"); -- no intersection
     cube_inter     
 -------------------
  (13, 14),(10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,14), (16,15)'::cube); -- no intersection, but one dimension intersects
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,14), (16,15)'::"cube"); -- no intersection, but one dimension intersects
     cube_inter    
 ------------------
  (3, 14),(10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(10,11), (16,15)'::cube); -- point intersection
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(10,11), (16,15)'::"cube"); -- point intersection
  cube_inter 
 ------------
  (10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2,3)'::cube, '(1,2,3)'::cube); -- point args
+SELECT cube_inter('(1,2,3)'::"cube", '(1,2,3)'::"cube"); -- point args
  cube_inter 
 ------------
  (1, 2, 3)
 (1 row)
 
-SELECT cube_inter('(1,2,3)'::cube, '(5,6,3)'::cube); -- point args
+SELECT cube_inter('(1,2,3)'::"cube", '(5,6,3)'::"cube"); -- point args
      cube_inter      
 ---------------------
  (5, 6, 3),(1, 2, 3)
@@ -1369,13 +1369,13 @@ SELECT cube_inter('(1,2,3)'::cube, '(5,6,3)'::cube); -- point args
 
 -- Test of cube_size
 --
-SELECT cube_size('(4,8),(15,16)'::cube);
+SELECT cube_size('(4,8),(15,16)'::"cube");
  cube_size 
 -----------
         88
 (1 row)
 
-SELECT cube_size('(42,137)'::cube);
+SELECT cube_size('(42,137)'::"cube");
  cube_size 
 -----------
          0
@@ -1383,7 +1383,7 @@ SELECT cube_size('(42,137)'::cube);
 
 -- Load some example data and build the index
 --
-CREATE TABLE test_cube (c cube);
+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)' ORDER BY c;
diff --git a/contrib/cube/expected/cube_2.out b/contrib/cube/expected/cube_2.out
index 3767d0e..747e9ba 100644
--- a/contrib/cube/expected/cube_2.out
+++ b/contrib/cube/expected/cube_2.out
@@ -1,552 +1,552 @@
 --
 --  Test cube datatype
 --
-CREATE EXTENSION cube;
+CREATE EXTENSION "cube";
 --
 -- testing the input and output functions
 --
 -- Any number (a one-dimensional point)
-SELECT '1'::cube AS cube;
+SELECT '1'::"cube" AS "cube";
  cube 
 ------
  (1)
 (1 row)
 
-SELECT '-1'::cube AS cube;
+SELECT '-1'::"cube" AS "cube";
  cube 
 ------
  (-1)
 (1 row)
 
-SELECT '1.'::cube AS cube;
+SELECT '1.'::"cube" AS "cube";
  cube 
 ------
  (1)
 (1 row)
 
-SELECT '-1.'::cube AS cube;
+SELECT '-1.'::"cube" AS "cube";
  cube 
 ------
  (-1)
 (1 row)
 
-SELECT '.1'::cube AS cube;
+SELECT '.1'::"cube" AS "cube";
  cube  
 -------
  (0.1)
 (1 row)
 
-SELECT '-.1'::cube AS cube;
+SELECT '-.1'::"cube" AS "cube";
   cube  
 --------
  (-0.1)
 (1 row)
 
-SELECT '1.0'::cube AS cube;
+SELECT '1.0'::"cube" AS "cube";
  cube 
 ------
  (1)
 (1 row)
 
-SELECT '-1.0'::cube AS cube;
+SELECT '-1.0'::"cube" AS "cube";
  cube 
 ------
  (-1)
 (1 row)
 
-SELECT '1e27'::cube AS cube;
+SELECT '1e27'::"cube" AS "cube";
    cube   
 ----------
  (1e+027)
 (1 row)
 
-SELECT '-1e27'::cube AS cube;
+SELECT '-1e27'::"cube" AS "cube";
    cube    
 -----------
  (-1e+027)
 (1 row)
 
-SELECT '1.0e27'::cube AS cube;
+SELECT '1.0e27'::"cube" AS "cube";
    cube   
 ----------
  (1e+027)
 (1 row)
 
-SELECT '-1.0e27'::cube AS cube;
+SELECT '-1.0e27'::"cube" AS "cube";
    cube    
 -----------
  (-1e+027)
 (1 row)
 
-SELECT '1e+27'::cube AS cube;
+SELECT '1e+27'::"cube" AS "cube";
    cube   
 ----------
  (1e+027)
 (1 row)
 
-SELECT '-1e+27'::cube AS cube;
+SELECT '-1e+27'::"cube" AS "cube";
    cube    
 -----------
  (-1e+027)
 (1 row)
 
-SELECT '1.0e+27'::cube AS cube;
+SELECT '1.0e+27'::"cube" AS "cube";
    cube   
 ----------
  (1e+027)
 (1 row)
 
-SELECT '-1.0e+27'::cube AS cube;
+SELECT '-1.0e+27'::"cube" AS "cube";
    cube    
 -----------
  (-1e+027)
 (1 row)
 
-SELECT '1e-7'::cube AS cube;
+SELECT '1e-7'::"cube" AS "cube";
    cube   
 ----------
  (1e-007)
 (1 row)
 
-SELECT '-1e-7'::cube AS cube;
+SELECT '-1e-7'::"cube" AS "cube";
    cube    
 -----------
  (-1e-007)
 (1 row)
 
-SELECT '1.0e-7'::cube AS cube;
+SELECT '1.0e-7'::"cube" AS "cube";
    cube   
 ----------
  (1e-007)
 (1 row)
 
-SELECT '-1.0e-7'::cube AS cube;
+SELECT '-1.0e-7'::"cube" AS "cube";
    cube    
 -----------
  (-1e-007)
 (1 row)
 
-SELECT '1e-700'::cube AS cube;
+SELECT '1e-700'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '-1e-700'::cube AS cube;
+SELECT '-1e-700'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '1234567890123456'::cube AS cube;
+SELECT '1234567890123456'::"cube" AS "cube";
           cube           
 -------------------------
  (1.23456789012346e+015)
 (1 row)
 
-SELECT '+1234567890123456'::cube AS cube;
+SELECT '+1234567890123456'::"cube" AS "cube";
           cube           
 -------------------------
  (1.23456789012346e+015)
 (1 row)
 
-SELECT '-1234567890123456'::cube AS cube;
+SELECT '-1234567890123456'::"cube" AS "cube";
            cube           
 --------------------------
  (-1.23456789012346e+015)
 (1 row)
 
-SELECT '.1234567890123456'::cube AS cube;
+SELECT '.1234567890123456'::"cube" AS "cube";
         cube         
 ---------------------
  (0.123456789012346)
 (1 row)
 
-SELECT '+.1234567890123456'::cube AS cube;
+SELECT '+.1234567890123456'::"cube" AS "cube";
         cube         
 ---------------------
  (0.123456789012346)
 (1 row)
 
-SELECT '-.1234567890123456'::cube AS cube;
+SELECT '-.1234567890123456'::"cube" AS "cube";
          cube         
 ----------------------
  (-0.123456789012346)
 (1 row)
 
 -- simple lists (points)
-SELECT '1,2'::cube AS cube;
+SELECT '1,2'::"cube" AS "cube";
   cube  
 --------
  (1, 2)
 (1 row)
 
-SELECT '(1,2)'::cube AS cube;
+SELECT '(1,2)'::"cube" AS "cube";
   cube  
 --------
  (1, 2)
 (1 row)
 
-SELECT '1,2,3,4,5'::cube AS cube;
+SELECT '1,2,3,4,5'::"cube" AS "cube";
       cube       
 -----------------
  (1, 2, 3, 4, 5)
 (1 row)
 
-SELECT '(1,2,3,4,5)'::cube AS cube;
+SELECT '(1,2,3,4,5)'::"cube" AS "cube";
       cube       
 -----------------
  (1, 2, 3, 4, 5)
 (1 row)
 
 -- double lists (cubes)
-SELECT '(0),(0)'::cube AS cube;
+SELECT '(0),(0)'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '(0),(1)'::cube AS cube;
+SELECT '(0),(1)'::"cube" AS "cube";
   cube   
 ---------
  (0),(1)
 (1 row)
 
-SELECT '[(0),(0)]'::cube AS cube;
+SELECT '[(0),(0)]'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '[(0),(1)]'::cube AS cube;
+SELECT '[(0),(1)]'::"cube" AS "cube";
   cube   
 ---------
  (0),(1)
 (1 row)
 
-SELECT '(0,0,0,0),(0,0,0,0)'::cube AS cube;
+SELECT '(0,0,0,0),(0,0,0,0)'::"cube" AS "cube";
      cube     
 --------------
  (0, 0, 0, 0)
 (1 row)
 
-SELECT '(0,0,0,0),(1,0,0,0)'::cube AS cube;
+SELECT '(0,0,0,0),(1,0,0,0)'::"cube" AS "cube";
            cube            
 ---------------------------
  (0, 0, 0, 0),(1, 0, 0, 0)
 (1 row)
 
-SELECT '[(0,0,0,0),(0,0,0,0)]'::cube AS cube;
+SELECT '[(0,0,0,0),(0,0,0,0)]'::"cube" AS "cube";
      cube     
 --------------
  (0, 0, 0, 0)
 (1 row)
 
-SELECT '[(0,0,0,0),(1,0,0,0)]'::cube AS cube;
+SELECT '[(0,0,0,0),(1,0,0,0)]'::"cube" AS "cube";
            cube            
 ---------------------------
  (0, 0, 0, 0),(1, 0, 0, 0)
 (1 row)
 
 -- invalid input: parse errors
-SELECT ''::cube AS cube;
+SELECT ''::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT ''::cube AS cube;
+LINE 1: SELECT ''::"cube" AS "cube";
                ^
 DETAIL:  syntax error at end of input
-SELECT 'ABC'::cube AS cube;
+SELECT 'ABC'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT 'ABC'::cube AS cube;
+LINE 1: SELECT 'ABC'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "A"
-SELECT '()'::cube AS cube;
+SELECT '()'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '()'::cube AS cube;
+LINE 1: SELECT '()'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '[]'::cube AS cube;
+SELECT '[]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[]'::cube AS cube;
+LINE 1: SELECT '[]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "]"
-SELECT '[()]'::cube AS cube;
+SELECT '[()]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[()]'::cube AS cube;
+LINE 1: SELECT '[()]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '[(1)]'::cube AS cube;
+SELECT '[(1)]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1)]'::cube AS cube;
+LINE 1: SELECT '[(1)]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "]"
-SELECT '[(1),]'::cube AS cube;
+SELECT '[(1),]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),]'::cube AS cube;
+LINE 1: SELECT '[(1),]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "]"
-SELECT '[(1),2]'::cube AS cube;
+SELECT '[(1),2]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),2]'::cube AS cube;
+LINE 1: SELECT '[(1),2]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "2"
-SELECT '[(1),(2),(3)]'::cube AS cube;
+SELECT '[(1),(2),(3)]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),(2),(3)]'::cube AS cube;
+LINE 1: SELECT '[(1),(2),(3)]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '1,'::cube AS cube;
+SELECT '1,'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '1,'::cube AS cube;
+LINE 1: SELECT '1,'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at end of input
-SELECT '1,2,'::cube AS cube;
+SELECT '1,2,'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '1,2,'::cube AS cube;
+LINE 1: SELECT '1,2,'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at end of input
-SELECT '1,,2'::cube AS cube;
+SELECT '1,,2'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '1,,2'::cube AS cube;
+LINE 1: SELECT '1,,2'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '(1,)'::cube AS cube;
+SELECT '(1,)'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,)'::cube AS cube;
+LINE 1: SELECT '(1,)'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '(1,2,)'::cube AS cube;
+SELECT '(1,2,)'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,)'::cube AS cube;
+LINE 1: SELECT '(1,2,)'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '(1,,2)'::cube AS cube;
+SELECT '(1,,2)'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,,2)'::cube AS cube;
+LINE 1: SELECT '(1,,2)'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
 -- invalid input: semantic errors and trailing garbage
-SELECT '[(1),(2)],'::cube AS cube; -- 0
+SELECT '[(1),(2)],'::"cube" AS "cube"; -- 0
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),(2)],'::cube AS cube;
+LINE 1: SELECT '[(1),(2)],'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '[(1,2,3),(2,3)]'::cube AS cube; -- 1
+SELECT '[(1,2,3),(2,3)]'::"cube" AS "cube"; -- 1
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1,2,3),(2,3)]'::cube AS cube;
+LINE 1: SELECT '[(1,2,3),(2,3)]'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2,3) and (2,3).
-SELECT '[(1,2),(1,2,3)]'::cube AS cube; -- 1
+SELECT '[(1,2),(1,2,3)]'::"cube" AS "cube"; -- 1
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1,2),(1,2,3)]'::cube AS cube;
+LINE 1: SELECT '[(1,2),(1,2,3)]'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2) and (1,2,3).
-SELECT '(1),(2),'::cube AS cube; -- 2
+SELECT '(1),(2),'::"cube" AS "cube"; -- 2
 ERROR:  bad cube representation
-LINE 1: SELECT '(1),(2),'::cube AS cube;
+LINE 1: SELECT '(1),(2),'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
+SELECT '(1,2,3),(2,3)'::"cube" AS "cube"; -- 3
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,3),(2,3)'::cube AS cube;
+LINE 1: SELECT '(1,2,3),(2,3)'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2,3) and (2,3).
-SELECT '(1,2),(1,2,3)'::cube AS cube; -- 3
+SELECT '(1,2),(1,2,3)'::"cube" AS "cube"; -- 3
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2),(1,2,3)'::cube AS cube;
+LINE 1: SELECT '(1,2),(1,2,3)'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2) and (1,2,3).
-SELECT '(1,2,3)ab'::cube AS cube; -- 4
+SELECT '(1,2,3)ab'::"cube" AS "cube"; -- 4
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,3)ab'::cube AS cube;
+LINE 1: SELECT '(1,2,3)ab'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '(1,2,3)a'::cube AS cube; -- 5
+SELECT '(1,2,3)a'::"cube" AS "cube"; -- 5
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,3)a'::cube AS cube;
+LINE 1: SELECT '(1,2,3)a'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '(1,2)('::cube AS cube; -- 5
+SELECT '(1,2)('::"cube" AS "cube"; -- 5
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2)('::cube AS cube;
+LINE 1: SELECT '(1,2)('::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "("
-SELECT '1,2ab'::cube AS cube; -- 6
+SELECT '1,2ab'::"cube" AS "cube"; -- 6
 ERROR:  bad cube representation
-LINE 1: SELECT '1,2ab'::cube AS cube;
+LINE 1: SELECT '1,2ab'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '1 e7'::cube AS cube; -- 6
+SELECT '1 e7'::"cube" AS "cube"; -- 6
 ERROR:  bad cube representation
-LINE 1: SELECT '1 e7'::cube AS cube;
+LINE 1: SELECT '1 e7'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "e"
-SELECT '1,2a'::cube AS cube; -- 7
+SELECT '1,2a'::"cube" AS "cube"; -- 7
 ERROR:  bad cube representation
-LINE 1: SELECT '1,2a'::cube AS cube;
+LINE 1: SELECT '1,2a'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '1..2'::cube AS cube; -- 7
+SELECT '1..2'::"cube" AS "cube"; -- 7
 ERROR:  bad cube representation
-LINE 1: SELECT '1..2'::cube AS cube;
+LINE 1: SELECT '1..2'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ".2"
 --
 -- Testing building cubes from float8 values
 --
-SELECT cube(0::float8);
+SELECT "cube"(0::float8);
  cube 
 ------
  (0)
 (1 row)
 
-SELECT cube(1::float8);
+SELECT "cube"(1::float8);
  cube 
 ------
  (1)
 (1 row)
 
-SELECT cube(1,2);
+SELECT "cube"(1,2);
   cube   
 ---------
  (1),(2)
 (1 row)
 
-SELECT cube(cube(1,2),3);
+SELECT "cube"("cube"(1,2),3);
      cube      
 ---------------
  (1, 3),(2, 3)
 (1 row)
 
-SELECT cube(cube(1,2),3,4);
+SELECT "cube"("cube"(1,2),3,4);
      cube      
 ---------------
  (1, 3),(2, 4)
 (1 row)
 
-SELECT cube(cube(cube(1,2),3,4),5);
+SELECT "cube"("cube"("cube"(1,2),3,4),5);
         cube         
 ---------------------
  (1, 3, 5),(2, 4, 5)
 (1 row)
 
-SELECT cube(cube(cube(1,2),3,4),5,6);
+SELECT "cube"("cube"("cube"(1,2),3,4),5,6);
         cube         
 ---------------------
  (1, 3, 5),(2, 4, 6)
 (1 row)
 
 --
--- Test that the text -> cube cast was installed.
+-- Test that the text -> "cube" cast was installed.
 --
-SELECT '(0)'::text::cube;
+SELECT '(0)'::text::"cube";
  cube 
 ------
  (0)
 (1 row)
 
 --
--- Test the float[] -> cube cast
+-- Test the float[] -> "cube" cast
 --
-SELECT cube('{0,1,2}'::float[], '{3,4,5}'::float[]);
+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[]);
+SELECT "cube"('{0,1,2}'::float[], '{3}'::float[]);
 ERROR:  UR and LL arrays must be of same length
-SELECT cube(NULL::float[], '{3}'::float[]);
+SELECT "cube"(NULL::float[], '{3}'::float[]);
  cube 
 ------
  
 (1 row)
 
-SELECT cube('{0,1,2}'::float[]);
+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]);
+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),(1,3,5)'), ARRAY[3,2,1,1]);
+SELECT cube_subset("cube"('(1,3,5),(1,3,5)'), ARRAY[3,2,1,1]);
  cube_subset  
 --------------
  (5, 3, 1, 1)
 (1 row)
 
-SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
+SELECT cube_subset("cube"('(1,3,5),(6,7,8)'), ARRAY[4,0]);
 ERROR:  Index out of bounds
-SELECT cube_subset(cube('(6,7,8),(6,7,8)'), ARRAY[4,0]);
+SELECT cube_subset("cube"('(6,7,8),(6,7,8)'), ARRAY[4,0]);
 ERROR:  Index out of bounds
 --
 -- Test point processing
 --
-SELECT cube('(1,2),(1,2)'); -- cube_in
+SELECT "cube"('(1,2),(1,2)'); -- cube_in
   cube  
 --------
  (1, 2)
 (1 row)
 
-SELECT cube('{0,1,2}'::float[], '{0,1,2}'::float[]); -- cube_a_f8_f8
+SELECT "cube"('{0,1,2}'::float[], '{0,1,2}'::float[]); -- cube_a_f8_f8
    cube    
 -----------
  (0, 1, 2)
 (1 row)
 
-SELECT cube('{5,6,7,8}'::float[]); -- cube_a_f8
+SELECT "cube"('{5,6,7,8}'::float[]); -- cube_a_f8
      cube     
 --------------
  (5, 6, 7, 8)
 (1 row)
 
-SELECT cube(1.37); -- cube_f8
+SELECT "cube"(1.37); -- cube_f8
   cube  
 --------
  (1.37)
 (1 row)
 
-SELECT cube(1.37, 1.37); -- cube_f8_f8
+SELECT "cube"(1.37, 1.37); -- cube_f8_f8
   cube  
 --------
  (1.37)
 (1 row)
 
-SELECT cube(cube(1,1), 42); -- cube_c_f8
+SELECT "cube"("cube"(1,1), 42); -- cube_c_f8
   cube   
 ---------
  (1, 42)
 (1 row)
 
-SELECT cube(cube(1,2), 42); -- cube_c_f8
+SELECT "cube"("cube"(1,2), 42); -- cube_c_f8
       cube       
 -----------------
  (1, 42),(2, 42)
 (1 row)
 
-SELECT cube(cube(1,1), 42, 42); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,1), 42, 42); -- cube_c_f8_f8
   cube   
 ---------
  (1, 42)
 (1 row)
 
-SELECT cube(cube(1,1), 42, 24); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,1), 42, 24); -- cube_c_f8_f8
       cube       
 -----------------
  (1, 42),(1, 24)
 (1 row)
 
-SELECT cube(cube(1,2), 42, 42); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,2), 42, 42); -- cube_c_f8_f8
       cube       
 -----------------
  (1, 42),(2, 42)
 (1 row)
 
-SELECT cube(cube(1,2), 42, 24); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,2), 42, 24); -- cube_c_f8_f8
       cube       
 -----------------
  (1, 42),(2, 24)
@@ -555,12 +555,12 @@ SELECT cube(cube(1,2), 42, 24); -- cube_c_f8_f8
 --
 -- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
 --
-select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::cube;
+select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::"cube";
 ERROR:  bad cube representation
 LINE 1: select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...
                ^
 DETAIL:  A cube cannot have more than 100 dimensions.
-select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::cube;
+select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::"cube";
 ERROR:  bad cube representation
 LINE 1: select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...
                ^
@@ -570,37 +570,37 @@ DETAIL:  A cube cannot have more than 100 dimensions.
 --
 -- equality/inequality:
 --
-SELECT '24, 33.20'::cube    =  '24, 33.20'::cube AS bool;
+SELECT '24, 33.20'::"cube"    =  '24, 33.20'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '24, 33.20'::cube    != '24, 33.20'::cube AS bool;
+SELECT '24, 33.20'::"cube"    != '24, 33.20'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '24, 33.20'::cube    =  '24, 33.21'::cube AS bool;
+SELECT '24, 33.20'::"cube"    =  '24, 33.21'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '24, 33.20'::cube    != '24, 33.21'::cube AS bool;
+SELECT '24, 33.20'::"cube"    != '24, 33.21'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"  =  '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"  =  '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
  bool 
 ------
  f
@@ -609,97 +609,97 @@ SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
 -- "lower than" / "greater than"
 -- (these operators are not useful for anything but ordering)
 --
-SELECT '1'::cube   > '2'::cube AS bool;
+SELECT '1'::"cube"   > '2'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '1'::cube   < '2'::cube AS bool;
+SELECT '1'::"cube"   < '2'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '1,1'::cube > '1,2'::cube AS bool;
+SELECT '1,1'::"cube" > '1,2'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '1,1'::cube < '1,2'::cube AS bool;
+SELECT '1,1'::"cube" < '1,2'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,1),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,1),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,1),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,1),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,1)'::cube > '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,1)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,1)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,1)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0,0,0,1),(3,1,0,0,0)'::cube > '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,1),(3,1,0,0,0)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,1),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,1),(3,1,0,0,0)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube > '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,0)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,0)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  f
@@ -707,235 +707,235 @@ SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
 
 -- "overlap"
 --
-SELECT '1'::cube && '1'::cube AS bool;
+SELECT '1'::"cube" && '1'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '1'::cube && '2'::cube AS bool;
+SELECT '1'::"cube" && '2'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '0'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '0'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '1'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '1'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '1,1,1'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '1,1,1'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(1,1,1),(2,2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(1,1,1),(2,2,2)]'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(1,1),(2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(1,1),(2,2)]'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(2,1,1),(2,2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(2,1,1),(2,2,2)]'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
--- "contained in" (the left operand is the cube entirely enclosed by
+-- "contained in" (the left operand is the "cube" entirely enclosed by
 -- the right operand):
 --
-SELECT '0'::cube                 <@ '0'::cube                        AS bool;
+SELECT '0'::"cube"                 <@ '0'::"cube"                        AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,0'::cube             <@ '0,0,0'::cube                    AS bool;
+SELECT '0,0,0'::"cube"             <@ '0,0,0'::"cube"                    AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0'::cube               <@ '0,0,1'::cube                    AS bool;
+SELECT '0,0'::"cube"               <@ '0,0,1'::"cube"                    AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,0'::cube             <@ '0,0,1'::cube                    AS bool;
+SELECT '0,0,0'::"cube"             <@ '0,0,1'::"cube"                    AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '1,0,0'::cube             <@ '0,0,1'::cube                    AS bool;
+SELECT '1,0,0'::"cube"             <@ '0,0,1'::"cube"                    AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(1,0,0),(0,0,1)'::cube          AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(1,0,0),(0,0,1)'::"cube"          AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(-1,-1,-1),(1,1,1)'::cube       AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(-1,-1,-1),(1,1,1)'::"cube"       AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(-1,-1,-1,-1),(1,1,1,1)'::cube  AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(-1,-1,-1,-1),(1,1,1,1)'::"cube"  AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0'::cube                 <@ '(-1),(1)'::cube                 AS bool;
+SELECT '0'::"cube"                 <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '1'::cube                 <@ '(-1),(1)'::cube                 AS bool;
+SELECT '1'::"cube"                 <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '-1'::cube                <@ '(-1),(1)'::cube                 AS bool;
+SELECT '-1'::"cube"                <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube          <@ '(-1),(1)'::cube                 AS bool;
+SELECT '(-1),(1)'::"cube"          <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube          <@ '(-1,-1),(1,1)'::cube            AS bool;
+SELECT '(-1),(1)'::"cube"          <@ '(-1,-1),(1,1)'::"cube"            AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-2),(1)'::cube          <@ '(-1),(1)'::cube                 AS bool;
+SELECT '(-2),(1)'::"cube"          <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(-2),(1)'::cube          <@ '(-1,-1),(1,1)'::cube            AS bool;
+SELECT '(-2),(1)'::"cube"          <@ '(-1,-1),(1,1)'::"cube"            AS bool;
  bool 
 ------
  f
 (1 row)
 
--- "contains" (the left operand is the cube that entirely encloses the
+-- "contains" (the left operand is the "cube" that entirely encloses the
 -- right operand)
 --
-SELECT '0'::cube                        @> '0'::cube                 AS bool;
+SELECT '0'::"cube"                        @> '0'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,0'::cube                    @> '0,0,0'::cube             AS bool;
+SELECT '0,0,0'::"cube"                    @> '0,0,0'::"cube"             AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,1'::cube                    @> '0,0'::cube               AS bool;
+SELECT '0,0,1'::"cube"                    @> '0,0'::"cube"               AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,1'::cube                    @> '0,0,0'::cube             AS bool;
+SELECT '0,0,1'::"cube"                    @> '0,0,0'::"cube"             AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '0,0,1'::cube                    @> '1,0,0'::cube             AS bool;
+SELECT '0,0,1'::"cube"                    @> '1,0,0'::"cube"             AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube          @> '(1,0,0),(0,0,1)'::cube   AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"          @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1,-1,-1),(1,1,1)'::cube       @> '(1,0,0),(0,0,1)'::cube   AS bool;
+SELECT '(-1,-1,-1),(1,1,1)'::"cube"       @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1,-1,-1,-1),(1,1,1,1)'::cube  @> '(1,0,0),(0,0,1)'::cube   AS bool;
+SELECT '(-1,-1,-1,-1),(1,1,1,1)'::"cube"  @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '0'::cube                 AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '0'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '1'::cube                 AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '1'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '-1'::cube                AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '-1'::"cube"                AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '(-1),(1)'::cube          AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '(-1),(1)'::"cube"          AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1,-1),(1,1)'::cube            @> '(-1),(1)'::cube          AS bool;
+SELECT '(-1,-1),(1,1)'::"cube"            @> '(-1),(1)'::"cube"          AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '(-2),(1)'::cube          AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '(-2),(1)'::"cube"          AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(-1,-1),(1,1)'::cube            @> '(-2),(1)'::cube          AS bool;
+SELECT '(-1,-1),(1,1)'::"cube"            @> '(-2),(1)'::"cube"          AS bool;
  bool 
 ------
  f
@@ -943,77 +943,77 @@ SELECT '(-1,-1),(1,1)'::cube            @> '(-2),(1)'::cube          AS bool;
 
 -- Test of distance function
 --
-SELECT cube_distance('(0)'::cube,'(2,2,2,2)'::cube);
+SELECT cube_distance('(0)'::"cube",'(2,2,2,2)'::"cube");
  cube_distance 
 ---------------
              4
 (1 row)
 
-SELECT cube_distance('(0)'::cube,'(.3,.4)'::cube);
+SELECT cube_distance('(0)'::"cube",'(.3,.4)'::"cube");
  cube_distance 
 ---------------
            0.5
 (1 row)
 
-SELECT cube_distance('(2,3,4)'::cube,'(2,3,4)'::cube);
+SELECT cube_distance('(2,3,4)'::"cube",'(2,3,4)'::"cube");
  cube_distance 
 ---------------
              0
 (1 row)
 
-SELECT cube_distance('(42,42,42,42)'::cube,'(137,137,137,137)'::cube);
+SELECT cube_distance('(42,42,42,42)'::"cube",'(137,137,137,137)'::"cube");
  cube_distance 
 ---------------
            190
 (1 row)
 
-SELECT cube_distance('(42,42,42)'::cube,'(137,137)'::cube);
+SELECT cube_distance('(42,42,42)'::"cube",'(137,137)'::"cube");
   cube_distance   
 ------------------
  140.762210837994
 (1 row)
 
--- Test of cube function (text to cube)
+-- Test of "cube" function (text to "cube")
 --
-SELECT cube('(1,1.2)'::text);
+SELECT "cube"('(1,1.2)'::text);
    cube   
 ----------
  (1, 1.2)
 (1 row)
 
-SELECT cube(NULL);
+SELECT "cube"(NULL);
  cube 
 ------
  
 (1 row)
 
--- Test of cube_dim function (dimensions stored in cube)
+-- Test of cube_dim function (dimensions stored in "cube")
 --
-SELECT cube_dim('(0)'::cube);
+SELECT cube_dim('(0)'::"cube");
  cube_dim 
 ----------
         1
 (1 row)
 
-SELECT cube_dim('(0,0)'::cube);
+SELECT cube_dim('(0,0)'::"cube");
  cube_dim 
 ----------
         2
 (1 row)
 
-SELECT cube_dim('(0,0,0)'::cube);
+SELECT cube_dim('(0,0,0)'::"cube");
  cube_dim 
 ----------
         3
 (1 row)
 
-SELECT cube_dim('(42,42,42),(42,42,42)'::cube);
+SELECT cube_dim('(42,42,42),(42,42,42)'::"cube");
  cube_dim 
 ----------
         3
 (1 row)
 
-SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::cube);
+SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::"cube");
  cube_dim 
 ----------
         5
@@ -1021,55 +1021,55 @@ SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::cube);
 
 -- Test of cube_ll_coord function (retrieves LL coodinate values)
 --
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 1);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 1);
  cube_ll_coord 
 ---------------
             -1
 (1 row)
 
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 2);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 2);
  cube_ll_coord 
 ---------------
             -2
 (1 row)
 
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 3);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 3);
  cube_ll_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 1);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 1);
  cube_ll_coord 
 ---------------
              1
 (1 row)
 
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 2);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 2);
  cube_ll_coord 
 ---------------
              2
 (1 row)
 
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 3);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 3);
  cube_ll_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ll_coord('(42,137)'::cube, 1);
+SELECT cube_ll_coord('(42,137)'::"cube", 1);
  cube_ll_coord 
 ---------------
             42
 (1 row)
 
-SELECT cube_ll_coord('(42,137)'::cube, 2);
+SELECT cube_ll_coord('(42,137)'::"cube", 2);
  cube_ll_coord 
 ---------------
            137
 (1 row)
 
-SELECT cube_ll_coord('(42,137)'::cube, 3);
+SELECT cube_ll_coord('(42,137)'::"cube", 3);
  cube_ll_coord 
 ---------------
              0
@@ -1077,55 +1077,55 @@ SELECT cube_ll_coord('(42,137)'::cube, 3);
 
 -- Test of cube_ur_coord function (retrieves UR coodinate values)
 --
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 1);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 1);
  cube_ur_coord 
 ---------------
              2
 (1 row)
 
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 2);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 2);
  cube_ur_coord 
 ---------------
              1
 (1 row)
 
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 3);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 3);
  cube_ur_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 1);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 1);
  cube_ur_coord 
 ---------------
              1
 (1 row)
 
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 2);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 2);
  cube_ur_coord 
 ---------------
              2
 (1 row)
 
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 3);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 3);
  cube_ur_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ur_coord('(42,137)'::cube, 1);
+SELECT cube_ur_coord('(42,137)'::"cube", 1);
  cube_ur_coord 
 ---------------
             42
 (1 row)
 
-SELECT cube_ur_coord('(42,137)'::cube, 2);
+SELECT cube_ur_coord('(42,137)'::"cube", 2);
  cube_ur_coord 
 ---------------
            137
 (1 row)
 
-SELECT cube_ur_coord('(42,137)'::cube, 3);
+SELECT cube_ur_coord('(42,137)'::"cube", 3);
  cube_ur_coord 
 ---------------
              0
@@ -1133,37 +1133,37 @@ SELECT cube_ur_coord('(42,137)'::cube, 3);
 
 -- Test of cube_is_point
 --
-SELECT cube_is_point('(0)'::cube);
+SELECT cube_is_point('(0)'::"cube");
  cube_is_point 
 ---------------
  t
 (1 row)
 
-SELECT cube_is_point('(0,1,2)'::cube);
+SELECT cube_is_point('(0,1,2)'::"cube");
  cube_is_point 
 ---------------
  t
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(0,1,2)'::cube);
+SELECT cube_is_point('(0,1,2),(0,1,2)'::"cube");
  cube_is_point 
 ---------------
  t
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(-1,1,2)'::cube);
+SELECT cube_is_point('(0,1,2),(-1,1,2)'::"cube");
  cube_is_point 
 ---------------
  f
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(0,-1,2)'::cube);
+SELECT cube_is_point('(0,1,2),(0,-1,2)'::"cube");
  cube_is_point 
 ---------------
  f
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(0,1,-2)'::cube);
+SELECT cube_is_point('(0,1,2),(0,1,-2)'::"cube");
  cube_is_point 
 ---------------
  f
@@ -1171,121 +1171,121 @@ SELECT cube_is_point('(0,1,2),(0,1,-2)'::cube);
 
 -- Test of cube_enlarge (enlarging and shrinking cubes)
 --
-SELECT cube_enlarge('(0)'::cube, 0, 0);
+SELECT cube_enlarge('(0)'::"cube", 0, 0);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 0, 1);
+SELECT cube_enlarge('(0)'::"cube", 0, 1);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 0, 2);
+SELECT cube_enlarge('(0)'::"cube", 0, 2);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(2),(-2)'::cube, 0, 4);
+SELECT cube_enlarge('(2),(-2)'::"cube", 0, 4);
  cube_enlarge 
 --------------
  (-2),(2)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 1, 0);
+SELECT cube_enlarge('(0)'::"cube", 1, 0);
  cube_enlarge 
 --------------
  (-1),(1)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 1, 1);
+SELECT cube_enlarge('(0)'::"cube", 1, 1);
  cube_enlarge 
 --------------
  (-1),(1)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 1, 2);
+SELECT cube_enlarge('(0)'::"cube", 1, 2);
   cube_enlarge   
 -----------------
  (-1, -1),(1, 1)
 (1 row)
 
-SELECT cube_enlarge('(2),(-2)'::cube, 1, 4);
+SELECT cube_enlarge('(2),(-2)'::"cube", 1, 4);
          cube_enlarge          
 -------------------------------
  (-3, -1, -1, -1),(3, 1, 1, 1)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, -1, 0);
+SELECT cube_enlarge('(0)'::"cube", -1, 0);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, -1, 1);
+SELECT cube_enlarge('(0)'::"cube", -1, 1);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, -1, 2);
+SELECT cube_enlarge('(0)'::"cube", -1, 2);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(2),(-2)'::cube, -1, 4);
+SELECT cube_enlarge('(2),(-2)'::"cube", -1, 4);
  cube_enlarge 
 --------------
  (-1),(1)
 (1 row)
 
-SELECT cube_enlarge('(0,0,0)'::cube, 1, 0);
+SELECT cube_enlarge('(0,0,0)'::"cube", 1, 0);
       cube_enlarge      
 ------------------------
  (-1, -1, -1),(1, 1, 1)
 (1 row)
 
-SELECT cube_enlarge('(0,0,0)'::cube, 1, 2);
+SELECT cube_enlarge('(0,0,0)'::"cube", 1, 2);
       cube_enlarge      
 ------------------------
  (-1, -1, -1),(1, 1, 1)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 1, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", 1, 2);
   cube_enlarge   
 -----------------
  (-4, -3),(3, 8)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 3, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", 3, 2);
    cube_enlarge   
 ------------------
  (-6, -5),(5, 10)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -1, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", -1, 2);
   cube_enlarge   
 -----------------
  (-2, -1),(1, 6)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", -3, 2);
     cube_enlarge     
 ---------------------
  (-0.5, 1),(-0.5, 4)
 (1 row)
 
-SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -23, 5);
+SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::"cube", -23, 5);
  cube_enlarge 
 --------------
  (42, 0, 0)
 (1 row)
 
-SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -24, 5);
+SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::"cube", -24, 5);
  cube_enlarge 
 --------------
  (42, 0, 0)
@@ -1293,31 +1293,31 @@ SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -24, 5);
 
 -- Test of cube_union (MBR for two cubes)
 --
-SELECT cube_union('(1,2),(3,4)'::cube, '(5,6,7),(8,9,10)'::cube);
+SELECT cube_union('(1,2),(3,4)'::"cube", '(5,6,7),(8,9,10)'::"cube");
       cube_union      
 ----------------------
  (1, 2, 0),(8, 9, 10)
 (1 row)
 
-SELECT cube_union('(1,2)'::cube, '(4,2,0,0)'::cube);
+SELECT cube_union('(1,2)'::"cube", '(4,2,0,0)'::"cube");
         cube_union         
 ---------------------------
  (1, 2, 0, 0),(4, 2, 0, 0)
 (1 row)
 
-SELECT cube_union('(1,2),(1,2)'::cube, '(4,2),(4,2)'::cube);
+SELECT cube_union('(1,2),(1,2)'::"cube", '(4,2),(4,2)'::"cube");
   cube_union   
 ---------------
  (1, 2),(4, 2)
 (1 row)
 
-SELECT cube_union('(1,2),(1,2)'::cube, '(1,2),(1,2)'::cube);
+SELECT cube_union('(1,2),(1,2)'::"cube", '(1,2),(1,2)'::"cube");
  cube_union 
 ------------
  (1, 2)
 (1 row)
 
-SELECT cube_union('(1,2),(1,2)'::cube, '(1,2,0),(1,2,0)'::cube);
+SELECT cube_union('(1,2),(1,2)'::"cube", '(1,2,0),(1,2,0)'::"cube");
  cube_union 
 ------------
  (1, 2, 0)
@@ -1325,43 +1325,43 @@ SELECT cube_union('(1,2),(1,2)'::cube, '(1,2,0),(1,2,0)'::cube);
 
 -- Test of cube_inter
 --
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,4), (16,15)'::cube); -- intersects
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,4), (16,15)'::"cube"); -- intersects
    cube_inter    
 -----------------
  (3, 4),(10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,4), (6,5)'::cube); -- includes
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,4), (6,5)'::"cube"); -- includes
   cube_inter   
 ---------------
  (3, 4),(6, 5)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(13,14), (16,15)'::cube); -- no intersection
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(13,14), (16,15)'::"cube"); -- no intersection
     cube_inter     
 -------------------
  (13, 14),(10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,14), (16,15)'::cube); -- no intersection, but one dimension intersects
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,14), (16,15)'::"cube"); -- no intersection, but one dimension intersects
     cube_inter    
 ------------------
  (3, 14),(10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(10,11), (16,15)'::cube); -- point intersection
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(10,11), (16,15)'::"cube"); -- point intersection
  cube_inter 
 ------------
  (10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2,3)'::cube, '(1,2,3)'::cube); -- point args
+SELECT cube_inter('(1,2,3)'::"cube", '(1,2,3)'::"cube"); -- point args
  cube_inter 
 ------------
  (1, 2, 3)
 (1 row)
 
-SELECT cube_inter('(1,2,3)'::cube, '(5,6,3)'::cube); -- point args
+SELECT cube_inter('(1,2,3)'::"cube", '(5,6,3)'::"cube"); -- point args
      cube_inter      
 ---------------------
  (5, 6, 3),(1, 2, 3)
@@ -1369,13 +1369,13 @@ SELECT cube_inter('(1,2,3)'::cube, '(5,6,3)'::cube); -- point args
 
 -- Test of cube_size
 --
-SELECT cube_size('(4,8),(15,16)'::cube);
+SELECT cube_size('(4,8),(15,16)'::"cube");
  cube_size 
 -----------
         88
 (1 row)
 
-SELECT cube_size('(42,137)'::cube);
+SELECT cube_size('(42,137)'::"cube");
  cube_size 
 -----------
          0
@@ -1383,7 +1383,7 @@ SELECT cube_size('(42,137)'::cube);
 
 -- Load some example data and build the index
 --
-CREATE TABLE test_cube (c cube);
+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)' ORDER BY c;
diff --git a/contrib/cube/expected/cube_3.out b/contrib/cube/expected/cube_3.out
index 2aa42be..33baec1 100644
--- a/contrib/cube/expected/cube_3.out
+++ b/contrib/cube/expected/cube_3.out
@@ -1,552 +1,552 @@
 --
 --  Test cube datatype
 --
-CREATE EXTENSION cube;
+CREATE EXTENSION "cube";
 --
 -- testing the input and output functions
 --
 -- Any number (a one-dimensional point)
-SELECT '1'::cube AS cube;
+SELECT '1'::"cube" AS "cube";
  cube 
 ------
  (1)
 (1 row)
 
-SELECT '-1'::cube AS cube;
+SELECT '-1'::"cube" AS "cube";
  cube 
 ------
  (-1)
 (1 row)
 
-SELECT '1.'::cube AS cube;
+SELECT '1.'::"cube" AS "cube";
  cube 
 ------
  (1)
 (1 row)
 
-SELECT '-1.'::cube AS cube;
+SELECT '-1.'::"cube" AS "cube";
  cube 
 ------
  (-1)
 (1 row)
 
-SELECT '.1'::cube AS cube;
+SELECT '.1'::"cube" AS "cube";
  cube  
 -------
  (0.1)
 (1 row)
 
-SELECT '-.1'::cube AS cube;
+SELECT '-.1'::"cube" AS "cube";
   cube  
 --------
  (-0.1)
 (1 row)
 
-SELECT '1.0'::cube AS cube;
+SELECT '1.0'::"cube" AS "cube";
  cube 
 ------
  (1)
 (1 row)
 
-SELECT '-1.0'::cube AS cube;
+SELECT '-1.0'::"cube" AS "cube";
  cube 
 ------
  (-1)
 (1 row)
 
-SELECT '1e27'::cube AS cube;
+SELECT '1e27'::"cube" AS "cube";
    cube   
 ----------
  (1e+027)
 (1 row)
 
-SELECT '-1e27'::cube AS cube;
+SELECT '-1e27'::"cube" AS "cube";
    cube    
 -----------
  (-1e+027)
 (1 row)
 
-SELECT '1.0e27'::cube AS cube;
+SELECT '1.0e27'::"cube" AS "cube";
    cube   
 ----------
  (1e+027)
 (1 row)
 
-SELECT '-1.0e27'::cube AS cube;
+SELECT '-1.0e27'::"cube" AS "cube";
    cube    
 -----------
  (-1e+027)
 (1 row)
 
-SELECT '1e+27'::cube AS cube;
+SELECT '1e+27'::"cube" AS "cube";
    cube   
 ----------
  (1e+027)
 (1 row)
 
-SELECT '-1e+27'::cube AS cube;
+SELECT '-1e+27'::"cube" AS "cube";
    cube    
 -----------
  (-1e+027)
 (1 row)
 
-SELECT '1.0e+27'::cube AS cube;
+SELECT '1.0e+27'::"cube" AS "cube";
    cube   
 ----------
  (1e+027)
 (1 row)
 
-SELECT '-1.0e+27'::cube AS cube;
+SELECT '-1.0e+27'::"cube" AS "cube";
    cube    
 -----------
  (-1e+027)
 (1 row)
 
-SELECT '1e-7'::cube AS cube;
+SELECT '1e-7'::"cube" AS "cube";
    cube   
 ----------
  (1e-007)
 (1 row)
 
-SELECT '-1e-7'::cube AS cube;
+SELECT '-1e-7'::"cube" AS "cube";
    cube    
 -----------
  (-1e-007)
 (1 row)
 
-SELECT '1.0e-7'::cube AS cube;
+SELECT '1.0e-7'::"cube" AS "cube";
    cube   
 ----------
  (1e-007)
 (1 row)
 
-SELECT '-1.0e-7'::cube AS cube;
+SELECT '-1.0e-7'::"cube" AS "cube";
    cube    
 -----------
  (-1e-007)
 (1 row)
 
-SELECT '1e-700'::cube AS cube;
+SELECT '1e-700'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '-1e-700'::cube AS cube;
+SELECT '-1e-700'::"cube" AS "cube";
  cube 
 ------
  (-0)
 (1 row)
 
-SELECT '1234567890123456'::cube AS cube;
+SELECT '1234567890123456'::"cube" AS "cube";
           cube           
 -------------------------
  (1.23456789012346e+015)
 (1 row)
 
-SELECT '+1234567890123456'::cube AS cube;
+SELECT '+1234567890123456'::"cube" AS "cube";
           cube           
 -------------------------
  (1.23456789012346e+015)
 (1 row)
 
-SELECT '-1234567890123456'::cube AS cube;
+SELECT '-1234567890123456'::"cube" AS "cube";
            cube           
 --------------------------
  (-1.23456789012346e+015)
 (1 row)
 
-SELECT '.1234567890123456'::cube AS cube;
+SELECT '.1234567890123456'::"cube" AS "cube";
         cube         
 ---------------------
  (0.123456789012346)
 (1 row)
 
-SELECT '+.1234567890123456'::cube AS cube;
+SELECT '+.1234567890123456'::"cube" AS "cube";
         cube         
 ---------------------
  (0.123456789012346)
 (1 row)
 
-SELECT '-.1234567890123456'::cube AS cube;
+SELECT '-.1234567890123456'::"cube" AS "cube";
          cube         
 ----------------------
  (-0.123456789012346)
 (1 row)
 
 -- simple lists (points)
-SELECT '1,2'::cube AS cube;
+SELECT '1,2'::"cube" AS "cube";
   cube  
 --------
  (1, 2)
 (1 row)
 
-SELECT '(1,2)'::cube AS cube;
+SELECT '(1,2)'::"cube" AS "cube";
   cube  
 --------
  (1, 2)
 (1 row)
 
-SELECT '1,2,3,4,5'::cube AS cube;
+SELECT '1,2,3,4,5'::"cube" AS "cube";
       cube       
 -----------------
  (1, 2, 3, 4, 5)
 (1 row)
 
-SELECT '(1,2,3,4,5)'::cube AS cube;
+SELECT '(1,2,3,4,5)'::"cube" AS "cube";
       cube       
 -----------------
  (1, 2, 3, 4, 5)
 (1 row)
 
 -- double lists (cubes)
-SELECT '(0),(0)'::cube AS cube;
+SELECT '(0),(0)'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '(0),(1)'::cube AS cube;
+SELECT '(0),(1)'::"cube" AS "cube";
   cube   
 ---------
  (0),(1)
 (1 row)
 
-SELECT '[(0),(0)]'::cube AS cube;
+SELECT '[(0),(0)]'::"cube" AS "cube";
  cube 
 ------
  (0)
 (1 row)
 
-SELECT '[(0),(1)]'::cube AS cube;
+SELECT '[(0),(1)]'::"cube" AS "cube";
   cube   
 ---------
  (0),(1)
 (1 row)
 
-SELECT '(0,0,0,0),(0,0,0,0)'::cube AS cube;
+SELECT '(0,0,0,0),(0,0,0,0)'::"cube" AS "cube";
      cube     
 --------------
  (0, 0, 0, 0)
 (1 row)
 
-SELECT '(0,0,0,0),(1,0,0,0)'::cube AS cube;
+SELECT '(0,0,0,0),(1,0,0,0)'::"cube" AS "cube";
            cube            
 ---------------------------
  (0, 0, 0, 0),(1, 0, 0, 0)
 (1 row)
 
-SELECT '[(0,0,0,0),(0,0,0,0)]'::cube AS cube;
+SELECT '[(0,0,0,0),(0,0,0,0)]'::"cube" AS "cube";
      cube     
 --------------
  (0, 0, 0, 0)
 (1 row)
 
-SELECT '[(0,0,0,0),(1,0,0,0)]'::cube AS cube;
+SELECT '[(0,0,0,0),(1,0,0,0)]'::"cube" AS "cube";
            cube            
 ---------------------------
  (0, 0, 0, 0),(1, 0, 0, 0)
 (1 row)
 
 -- invalid input: parse errors
-SELECT ''::cube AS cube;
+SELECT ''::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT ''::cube AS cube;
+LINE 1: SELECT ''::"cube" AS "cube";
                ^
 DETAIL:  syntax error at end of input
-SELECT 'ABC'::cube AS cube;
+SELECT 'ABC'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT 'ABC'::cube AS cube;
+LINE 1: SELECT 'ABC'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "A"
-SELECT '()'::cube AS cube;
+SELECT '()'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '()'::cube AS cube;
+LINE 1: SELECT '()'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '[]'::cube AS cube;
+SELECT '[]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[]'::cube AS cube;
+LINE 1: SELECT '[]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "]"
-SELECT '[()]'::cube AS cube;
+SELECT '[()]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[()]'::cube AS cube;
+LINE 1: SELECT '[()]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '[(1)]'::cube AS cube;
+SELECT '[(1)]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1)]'::cube AS cube;
+LINE 1: SELECT '[(1)]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "]"
-SELECT '[(1),]'::cube AS cube;
+SELECT '[(1),]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),]'::cube AS cube;
+LINE 1: SELECT '[(1),]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "]"
-SELECT '[(1),2]'::cube AS cube;
+SELECT '[(1),2]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),2]'::cube AS cube;
+LINE 1: SELECT '[(1),2]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "2"
-SELECT '[(1),(2),(3)]'::cube AS cube;
+SELECT '[(1),(2),(3)]'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),(2),(3)]'::cube AS cube;
+LINE 1: SELECT '[(1),(2),(3)]'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '1,'::cube AS cube;
+SELECT '1,'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '1,'::cube AS cube;
+LINE 1: SELECT '1,'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at end of input
-SELECT '1,2,'::cube AS cube;
+SELECT '1,2,'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '1,2,'::cube AS cube;
+LINE 1: SELECT '1,2,'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at end of input
-SELECT '1,,2'::cube AS cube;
+SELECT '1,,2'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '1,,2'::cube AS cube;
+LINE 1: SELECT '1,,2'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '(1,)'::cube AS cube;
+SELECT '(1,)'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,)'::cube AS cube;
+LINE 1: SELECT '(1,)'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '(1,2,)'::cube AS cube;
+SELECT '(1,2,)'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,)'::cube AS cube;
+LINE 1: SELECT '(1,2,)'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ")"
-SELECT '(1,,2)'::cube AS cube;
+SELECT '(1,,2)'::"cube" AS "cube";
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,,2)'::cube AS cube;
+LINE 1: SELECT '(1,,2)'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
 -- invalid input: semantic errors and trailing garbage
-SELECT '[(1),(2)],'::cube AS cube; -- 0
+SELECT '[(1),(2)],'::"cube" AS "cube"; -- 0
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1),(2)],'::cube AS cube;
+LINE 1: SELECT '[(1),(2)],'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '[(1,2,3),(2,3)]'::cube AS cube; -- 1
+SELECT '[(1,2,3),(2,3)]'::"cube" AS "cube"; -- 1
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1,2,3),(2,3)]'::cube AS cube;
+LINE 1: SELECT '[(1,2,3),(2,3)]'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2,3) and (2,3).
-SELECT '[(1,2),(1,2,3)]'::cube AS cube; -- 1
+SELECT '[(1,2),(1,2,3)]'::"cube" AS "cube"; -- 1
 ERROR:  bad cube representation
-LINE 1: SELECT '[(1,2),(1,2,3)]'::cube AS cube;
+LINE 1: SELECT '[(1,2),(1,2,3)]'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2) and (1,2,3).
-SELECT '(1),(2),'::cube AS cube; -- 2
+SELECT '(1),(2),'::"cube" AS "cube"; -- 2
 ERROR:  bad cube representation
-LINE 1: SELECT '(1),(2),'::cube AS cube;
+LINE 1: SELECT '(1),(2),'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ","
-SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
+SELECT '(1,2,3),(2,3)'::"cube" AS "cube"; -- 3
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,3),(2,3)'::cube AS cube;
+LINE 1: SELECT '(1,2,3),(2,3)'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2,3) and (2,3).
-SELECT '(1,2),(1,2,3)'::cube AS cube; -- 3
+SELECT '(1,2),(1,2,3)'::"cube" AS "cube"; -- 3
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2),(1,2,3)'::cube AS cube;
+LINE 1: SELECT '(1,2),(1,2,3)'::"cube" AS "cube";
                ^
 DETAIL:  Different point dimensions in (1,2) and (1,2,3).
-SELECT '(1,2,3)ab'::cube AS cube; -- 4
+SELECT '(1,2,3)ab'::"cube" AS "cube"; -- 4
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,3)ab'::cube AS cube;
+LINE 1: SELECT '(1,2,3)ab'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '(1,2,3)a'::cube AS cube; -- 5
+SELECT '(1,2,3)a'::"cube" AS "cube"; -- 5
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2,3)a'::cube AS cube;
+LINE 1: SELECT '(1,2,3)a'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '(1,2)('::cube AS cube; -- 5
+SELECT '(1,2)('::"cube" AS "cube"; -- 5
 ERROR:  bad cube representation
-LINE 1: SELECT '(1,2)('::cube AS cube;
+LINE 1: SELECT '(1,2)('::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "("
-SELECT '1,2ab'::cube AS cube; -- 6
+SELECT '1,2ab'::"cube" AS "cube"; -- 6
 ERROR:  bad cube representation
-LINE 1: SELECT '1,2ab'::cube AS cube;
+LINE 1: SELECT '1,2ab'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '1 e7'::cube AS cube; -- 6
+SELECT '1 e7'::"cube" AS "cube"; -- 6
 ERROR:  bad cube representation
-LINE 1: SELECT '1 e7'::cube AS cube;
+LINE 1: SELECT '1 e7'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "e"
-SELECT '1,2a'::cube AS cube; -- 7
+SELECT '1,2a'::"cube" AS "cube"; -- 7
 ERROR:  bad cube representation
-LINE 1: SELECT '1,2a'::cube AS cube;
+LINE 1: SELECT '1,2a'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near "a"
-SELECT '1..2'::cube AS cube; -- 7
+SELECT '1..2'::"cube" AS "cube"; -- 7
 ERROR:  bad cube representation
-LINE 1: SELECT '1..2'::cube AS cube;
+LINE 1: SELECT '1..2'::"cube" AS "cube";
                ^
 DETAIL:  syntax error at or near ".2"
 --
 -- Testing building cubes from float8 values
 --
-SELECT cube(0::float8);
+SELECT "cube"(0::float8);
  cube 
 ------
  (0)
 (1 row)
 
-SELECT cube(1::float8);
+SELECT "cube"(1::float8);
  cube 
 ------
  (1)
 (1 row)
 
-SELECT cube(1,2);
+SELECT "cube"(1,2);
   cube   
 ---------
  (1),(2)
 (1 row)
 
-SELECT cube(cube(1,2),3);
+SELECT "cube"("cube"(1,2),3);
      cube      
 ---------------
  (1, 3),(2, 3)
 (1 row)
 
-SELECT cube(cube(1,2),3,4);
+SELECT "cube"("cube"(1,2),3,4);
      cube      
 ---------------
  (1, 3),(2, 4)
 (1 row)
 
-SELECT cube(cube(cube(1,2),3,4),5);
+SELECT "cube"("cube"("cube"(1,2),3,4),5);
         cube         
 ---------------------
  (1, 3, 5),(2, 4, 5)
 (1 row)
 
-SELECT cube(cube(cube(1,2),3,4),5,6);
+SELECT "cube"("cube"("cube"(1,2),3,4),5,6);
         cube         
 ---------------------
  (1, 3, 5),(2, 4, 6)
 (1 row)
 
 --
--- Test that the text -> cube cast was installed.
+-- Test that the text -> "cube" cast was installed.
 --
-SELECT '(0)'::text::cube;
+SELECT '(0)'::text::"cube";
  cube 
 ------
  (0)
 (1 row)
 
 --
--- Test the float[] -> cube cast
+-- Test the float[] -> "cube" cast
 --
-SELECT cube('{0,1,2}'::float[], '{3,4,5}'::float[]);
+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[]);
+SELECT "cube"('{0,1,2}'::float[], '{3}'::float[]);
 ERROR:  UR and LL arrays must be of same length
-SELECT cube(NULL::float[], '{3}'::float[]);
+SELECT "cube"(NULL::float[], '{3}'::float[]);
  cube 
 ------
  
 (1 row)
 
-SELECT cube('{0,1,2}'::float[]);
+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]);
+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),(1,3,5)'), ARRAY[3,2,1,1]);
+SELECT cube_subset("cube"('(1,3,5),(1,3,5)'), ARRAY[3,2,1,1]);
  cube_subset  
 --------------
  (5, 3, 1, 1)
 (1 row)
 
-SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
+SELECT cube_subset("cube"('(1,3,5),(6,7,8)'), ARRAY[4,0]);
 ERROR:  Index out of bounds
-SELECT cube_subset(cube('(6,7,8),(6,7,8)'), ARRAY[4,0]);
+SELECT cube_subset("cube"('(6,7,8),(6,7,8)'), ARRAY[4,0]);
 ERROR:  Index out of bounds
 --
 -- Test point processing
 --
-SELECT cube('(1,2),(1,2)'); -- cube_in
+SELECT "cube"('(1,2),(1,2)'); -- cube_in
   cube  
 --------
  (1, 2)
 (1 row)
 
-SELECT cube('{0,1,2}'::float[], '{0,1,2}'::float[]); -- cube_a_f8_f8
+SELECT "cube"('{0,1,2}'::float[], '{0,1,2}'::float[]); -- cube_a_f8_f8
    cube    
 -----------
  (0, 1, 2)
 (1 row)
 
-SELECT cube('{5,6,7,8}'::float[]); -- cube_a_f8
+SELECT "cube"('{5,6,7,8}'::float[]); -- cube_a_f8
      cube     
 --------------
  (5, 6, 7, 8)
 (1 row)
 
-SELECT cube(1.37); -- cube_f8
+SELECT "cube"(1.37); -- cube_f8
   cube  
 --------
  (1.37)
 (1 row)
 
-SELECT cube(1.37, 1.37); -- cube_f8_f8
+SELECT "cube"(1.37, 1.37); -- cube_f8_f8
   cube  
 --------
  (1.37)
 (1 row)
 
-SELECT cube(cube(1,1), 42); -- cube_c_f8
+SELECT "cube"("cube"(1,1), 42); -- cube_c_f8
   cube   
 ---------
  (1, 42)
 (1 row)
 
-SELECT cube(cube(1,2), 42); -- cube_c_f8
+SELECT "cube"("cube"(1,2), 42); -- cube_c_f8
       cube       
 -----------------
  (1, 42),(2, 42)
 (1 row)
 
-SELECT cube(cube(1,1), 42, 42); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,1), 42, 42); -- cube_c_f8_f8
   cube   
 ---------
  (1, 42)
 (1 row)
 
-SELECT cube(cube(1,1), 42, 24); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,1), 42, 24); -- cube_c_f8_f8
       cube       
 -----------------
  (1, 42),(1, 24)
 (1 row)
 
-SELECT cube(cube(1,2), 42, 42); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,2), 42, 42); -- cube_c_f8_f8
       cube       
 -----------------
  (1, 42),(2, 42)
 (1 row)
 
-SELECT cube(cube(1,2), 42, 24); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,2), 42, 24); -- cube_c_f8_f8
       cube       
 -----------------
  (1, 42),(2, 24)
@@ -555,12 +555,12 @@ SELECT cube(cube(1,2), 42, 24); -- cube_c_f8_f8
 --
 -- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
 --
-select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::cube;
+select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::"cube";
 ERROR:  bad cube representation
 LINE 1: select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...
                ^
 DETAIL:  A cube cannot have more than 100 dimensions.
-select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::cube;
+select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::"cube";
 ERROR:  bad cube representation
 LINE 1: select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...
                ^
@@ -570,37 +570,37 @@ DETAIL:  A cube cannot have more than 100 dimensions.
 --
 -- equality/inequality:
 --
-SELECT '24, 33.20'::cube    =  '24, 33.20'::cube AS bool;
+SELECT '24, 33.20'::"cube"    =  '24, 33.20'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '24, 33.20'::cube    != '24, 33.20'::cube AS bool;
+SELECT '24, 33.20'::"cube"    != '24, 33.20'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '24, 33.20'::cube    =  '24, 33.21'::cube AS bool;
+SELECT '24, 33.20'::"cube"    =  '24, 33.21'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '24, 33.20'::cube    != '24, 33.21'::cube AS bool;
+SELECT '24, 33.20'::"cube"    != '24, 33.21'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"  =  '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"  =  '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
  bool 
 ------
  f
@@ -609,97 +609,97 @@ SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
 -- "lower than" / "greater than"
 -- (these operators are not useful for anything but ordering)
 --
-SELECT '1'::cube   > '2'::cube AS bool;
+SELECT '1'::"cube"   > '2'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '1'::cube   < '2'::cube AS bool;
+SELECT '1'::"cube"   < '2'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '1,1'::cube > '1,2'::cube AS bool;
+SELECT '1,1'::"cube" > '1,2'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '1,1'::cube < '1,2'::cube AS bool;
+SELECT '1,1'::"cube" < '1,2'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,1),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,1),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,1),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,1),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,1)'::cube > '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,1)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,1)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,1)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0,0,0,1),(3,1,0,0,0)'::cube > '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,1),(3,1,0,0,0)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,1),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,1),(3,1,0,0,0)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube > '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,0)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,0)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
  bool 
 ------
  f
@@ -707,235 +707,235 @@ SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
 
 -- "overlap"
 --
-SELECT '1'::cube && '1'::cube AS bool;
+SELECT '1'::"cube" && '1'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '1'::cube && '2'::cube AS bool;
+SELECT '1'::"cube" && '2'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '0'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '0'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '1'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '1'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '1,1,1'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '1,1,1'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(1,1,1),(2,2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(1,1,1),(2,2,2)]'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(1,1),(2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(1,1),(2,2)]'::"cube" AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(2,1,1),(2,2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(2,1,1),(2,2,2)]'::"cube" AS bool;
  bool 
 ------
  f
 (1 row)
 
--- "contained in" (the left operand is the cube entirely enclosed by
+-- "contained in" (the left operand is the "cube" entirely enclosed by
 -- the right operand):
 --
-SELECT '0'::cube                 <@ '0'::cube                        AS bool;
+SELECT '0'::"cube"                 <@ '0'::"cube"                        AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,0'::cube             <@ '0,0,0'::cube                    AS bool;
+SELECT '0,0,0'::"cube"             <@ '0,0,0'::"cube"                    AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0'::cube               <@ '0,0,1'::cube                    AS bool;
+SELECT '0,0'::"cube"               <@ '0,0,1'::"cube"                    AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,0'::cube             <@ '0,0,1'::cube                    AS bool;
+SELECT '0,0,0'::"cube"             <@ '0,0,1'::"cube"                    AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '1,0,0'::cube             <@ '0,0,1'::cube                    AS bool;
+SELECT '1,0,0'::"cube"             <@ '0,0,1'::"cube"                    AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(1,0,0),(0,0,1)'::cube          AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(1,0,0),(0,0,1)'::"cube"          AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(-1,-1,-1),(1,1,1)'::cube       AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(-1,-1,-1),(1,1,1)'::"cube"       AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(-1,-1,-1,-1),(1,1,1,1)'::cube  AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(-1,-1,-1,-1),(1,1,1,1)'::"cube"  AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0'::cube                 <@ '(-1),(1)'::cube                 AS bool;
+SELECT '0'::"cube"                 <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '1'::cube                 <@ '(-1),(1)'::cube                 AS bool;
+SELECT '1'::"cube"                 <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '-1'::cube                <@ '(-1),(1)'::cube                 AS bool;
+SELECT '-1'::"cube"                <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube          <@ '(-1),(1)'::cube                 AS bool;
+SELECT '(-1),(1)'::"cube"          <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube          <@ '(-1,-1),(1,1)'::cube            AS bool;
+SELECT '(-1),(1)'::"cube"          <@ '(-1,-1),(1,1)'::"cube"            AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-2),(1)'::cube          <@ '(-1),(1)'::cube                 AS bool;
+SELECT '(-2),(1)'::"cube"          <@ '(-1),(1)'::"cube"                 AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(-2),(1)'::cube          <@ '(-1,-1),(1,1)'::cube            AS bool;
+SELECT '(-2),(1)'::"cube"          <@ '(-1,-1),(1,1)'::"cube"            AS bool;
  bool 
 ------
  f
 (1 row)
 
--- "contains" (the left operand is the cube that entirely encloses the
+-- "contains" (the left operand is the "cube" that entirely encloses the
 -- right operand)
 --
-SELECT '0'::cube                        @> '0'::cube                 AS bool;
+SELECT '0'::"cube"                        @> '0'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,0'::cube                    @> '0,0,0'::cube             AS bool;
+SELECT '0,0,0'::"cube"                    @> '0,0,0'::"cube"             AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,1'::cube                    @> '0,0'::cube               AS bool;
+SELECT '0,0,1'::"cube"                    @> '0,0'::"cube"               AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '0,0,1'::cube                    @> '0,0,0'::cube             AS bool;
+SELECT '0,0,1'::"cube"                    @> '0,0,0'::"cube"             AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '0,0,1'::cube                    @> '1,0,0'::cube             AS bool;
+SELECT '0,0,1'::"cube"                    @> '1,0,0'::"cube"             AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(1,0,0),(0,0,1)'::cube          @> '(1,0,0),(0,0,1)'::cube   AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"          @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1,-1,-1),(1,1,1)'::cube       @> '(1,0,0),(0,0,1)'::cube   AS bool;
+SELECT '(-1,-1,-1),(1,1,1)'::"cube"       @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1,-1,-1,-1),(1,1,1,1)'::cube  @> '(1,0,0),(0,0,1)'::cube   AS bool;
+SELECT '(-1,-1,-1,-1),(1,1,1,1)'::"cube"  @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '0'::cube                 AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '0'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '1'::cube                 AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '1'::"cube"                 AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '-1'::cube                AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '-1'::"cube"                AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '(-1),(1)'::cube          AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '(-1),(1)'::"cube"          AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1,-1),(1,1)'::cube            @> '(-1),(1)'::cube          AS bool;
+SELECT '(-1,-1),(1,1)'::"cube"            @> '(-1),(1)'::"cube"          AS bool;
  bool 
 ------
  t
 (1 row)
 
-SELECT '(-1),(1)'::cube                 @> '(-2),(1)'::cube          AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '(-2),(1)'::"cube"          AS bool;
  bool 
 ------
  f
 (1 row)
 
-SELECT '(-1,-1),(1,1)'::cube            @> '(-2),(1)'::cube          AS bool;
+SELECT '(-1,-1),(1,1)'::"cube"            @> '(-2),(1)'::"cube"          AS bool;
  bool 
 ------
  f
@@ -943,77 +943,77 @@ SELECT '(-1,-1),(1,1)'::cube            @> '(-2),(1)'::cube          AS bool;
 
 -- Test of distance function
 --
-SELECT cube_distance('(0)'::cube,'(2,2,2,2)'::cube);
+SELECT cube_distance('(0)'::"cube",'(2,2,2,2)'::"cube");
  cube_distance 
 ---------------
              4
 (1 row)
 
-SELECT cube_distance('(0)'::cube,'(.3,.4)'::cube);
+SELECT cube_distance('(0)'::"cube",'(.3,.4)'::"cube");
  cube_distance 
 ---------------
            0.5
 (1 row)
 
-SELECT cube_distance('(2,3,4)'::cube,'(2,3,4)'::cube);
+SELECT cube_distance('(2,3,4)'::"cube",'(2,3,4)'::"cube");
  cube_distance 
 ---------------
              0
 (1 row)
 
-SELECT cube_distance('(42,42,42,42)'::cube,'(137,137,137,137)'::cube);
+SELECT cube_distance('(42,42,42,42)'::"cube",'(137,137,137,137)'::"cube");
  cube_distance 
 ---------------
            190
 (1 row)
 
-SELECT cube_distance('(42,42,42)'::cube,'(137,137)'::cube);
+SELECT cube_distance('(42,42,42)'::"cube",'(137,137)'::"cube");
   cube_distance   
 ------------------
  140.762210837994
 (1 row)
 
--- Test of cube function (text to cube)
+-- Test of "cube" function (text to "cube")
 --
-SELECT cube('(1,1.2)'::text);
+SELECT "cube"('(1,1.2)'::text);
    cube   
 ----------
  (1, 1.2)
 (1 row)
 
-SELECT cube(NULL);
+SELECT "cube"(NULL);
  cube 
 ------
  
 (1 row)
 
--- Test of cube_dim function (dimensions stored in cube)
+-- Test of cube_dim function (dimensions stored in "cube")
 --
-SELECT cube_dim('(0)'::cube);
+SELECT cube_dim('(0)'::"cube");
  cube_dim 
 ----------
         1
 (1 row)
 
-SELECT cube_dim('(0,0)'::cube);
+SELECT cube_dim('(0,0)'::"cube");
  cube_dim 
 ----------
         2
 (1 row)
 
-SELECT cube_dim('(0,0,0)'::cube);
+SELECT cube_dim('(0,0,0)'::"cube");
  cube_dim 
 ----------
         3
 (1 row)
 
-SELECT cube_dim('(42,42,42),(42,42,42)'::cube);
+SELECT cube_dim('(42,42,42),(42,42,42)'::"cube");
  cube_dim 
 ----------
         3
 (1 row)
 
-SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::cube);
+SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::"cube");
  cube_dim 
 ----------
         5
@@ -1021,55 +1021,55 @@ SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::cube);
 
 -- Test of cube_ll_coord function (retrieves LL coodinate values)
 --
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 1);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 1);
  cube_ll_coord 
 ---------------
             -1
 (1 row)
 
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 2);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 2);
  cube_ll_coord 
 ---------------
             -2
 (1 row)
 
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 3);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 3);
  cube_ll_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 1);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 1);
  cube_ll_coord 
 ---------------
              1
 (1 row)
 
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 2);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 2);
  cube_ll_coord 
 ---------------
              2
 (1 row)
 
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 3);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 3);
  cube_ll_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ll_coord('(42,137)'::cube, 1);
+SELECT cube_ll_coord('(42,137)'::"cube", 1);
  cube_ll_coord 
 ---------------
             42
 (1 row)
 
-SELECT cube_ll_coord('(42,137)'::cube, 2);
+SELECT cube_ll_coord('(42,137)'::"cube", 2);
  cube_ll_coord 
 ---------------
            137
 (1 row)
 
-SELECT cube_ll_coord('(42,137)'::cube, 3);
+SELECT cube_ll_coord('(42,137)'::"cube", 3);
  cube_ll_coord 
 ---------------
              0
@@ -1077,55 +1077,55 @@ SELECT cube_ll_coord('(42,137)'::cube, 3);
 
 -- Test of cube_ur_coord function (retrieves UR coodinate values)
 --
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 1);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 1);
  cube_ur_coord 
 ---------------
              2
 (1 row)
 
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 2);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 2);
  cube_ur_coord 
 ---------------
              1
 (1 row)
 
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 3);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 3);
  cube_ur_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 1);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 1);
  cube_ur_coord 
 ---------------
              1
 (1 row)
 
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 2);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 2);
  cube_ur_coord 
 ---------------
              2
 (1 row)
 
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 3);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 3);
  cube_ur_coord 
 ---------------
              0
 (1 row)
 
-SELECT cube_ur_coord('(42,137)'::cube, 1);
+SELECT cube_ur_coord('(42,137)'::"cube", 1);
  cube_ur_coord 
 ---------------
             42
 (1 row)
 
-SELECT cube_ur_coord('(42,137)'::cube, 2);
+SELECT cube_ur_coord('(42,137)'::"cube", 2);
  cube_ur_coord 
 ---------------
            137
 (1 row)
 
-SELECT cube_ur_coord('(42,137)'::cube, 3);
+SELECT cube_ur_coord('(42,137)'::"cube", 3);
  cube_ur_coord 
 ---------------
              0
@@ -1133,37 +1133,37 @@ SELECT cube_ur_coord('(42,137)'::cube, 3);
 
 -- Test of cube_is_point
 --
-SELECT cube_is_point('(0)'::cube);
+SELECT cube_is_point('(0)'::"cube");
  cube_is_point 
 ---------------
  t
 (1 row)
 
-SELECT cube_is_point('(0,1,2)'::cube);
+SELECT cube_is_point('(0,1,2)'::"cube");
  cube_is_point 
 ---------------
  t
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(0,1,2)'::cube);
+SELECT cube_is_point('(0,1,2),(0,1,2)'::"cube");
  cube_is_point 
 ---------------
  t
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(-1,1,2)'::cube);
+SELECT cube_is_point('(0,1,2),(-1,1,2)'::"cube");
  cube_is_point 
 ---------------
  f
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(0,-1,2)'::cube);
+SELECT cube_is_point('(0,1,2),(0,-1,2)'::"cube");
  cube_is_point 
 ---------------
  f
 (1 row)
 
-SELECT cube_is_point('(0,1,2),(0,1,-2)'::cube);
+SELECT cube_is_point('(0,1,2),(0,1,-2)'::"cube");
  cube_is_point 
 ---------------
  f
@@ -1171,121 +1171,121 @@ SELECT cube_is_point('(0,1,2),(0,1,-2)'::cube);
 
 -- Test of cube_enlarge (enlarging and shrinking cubes)
 --
-SELECT cube_enlarge('(0)'::cube, 0, 0);
+SELECT cube_enlarge('(0)'::"cube", 0, 0);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 0, 1);
+SELECT cube_enlarge('(0)'::"cube", 0, 1);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 0, 2);
+SELECT cube_enlarge('(0)'::"cube", 0, 2);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(2),(-2)'::cube, 0, 4);
+SELECT cube_enlarge('(2),(-2)'::"cube", 0, 4);
  cube_enlarge 
 --------------
  (-2),(2)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 1, 0);
+SELECT cube_enlarge('(0)'::"cube", 1, 0);
  cube_enlarge 
 --------------
  (-1),(1)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 1, 1);
+SELECT cube_enlarge('(0)'::"cube", 1, 1);
  cube_enlarge 
 --------------
  (-1),(1)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, 1, 2);
+SELECT cube_enlarge('(0)'::"cube", 1, 2);
   cube_enlarge   
 -----------------
  (-1, -1),(1, 1)
 (1 row)
 
-SELECT cube_enlarge('(2),(-2)'::cube, 1, 4);
+SELECT cube_enlarge('(2),(-2)'::"cube", 1, 4);
          cube_enlarge          
 -------------------------------
  (-3, -1, -1, -1),(3, 1, 1, 1)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, -1, 0);
+SELECT cube_enlarge('(0)'::"cube", -1, 0);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, -1, 1);
+SELECT cube_enlarge('(0)'::"cube", -1, 1);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(0)'::cube, -1, 2);
+SELECT cube_enlarge('(0)'::"cube", -1, 2);
  cube_enlarge 
 --------------
  (0)
 (1 row)
 
-SELECT cube_enlarge('(2),(-2)'::cube, -1, 4);
+SELECT cube_enlarge('(2),(-2)'::"cube", -1, 4);
  cube_enlarge 
 --------------
  (-1),(1)
 (1 row)
 
-SELECT cube_enlarge('(0,0,0)'::cube, 1, 0);
+SELECT cube_enlarge('(0,0,0)'::"cube", 1, 0);
       cube_enlarge      
 ------------------------
  (-1, -1, -1),(1, 1, 1)
 (1 row)
 
-SELECT cube_enlarge('(0,0,0)'::cube, 1, 2);
+SELECT cube_enlarge('(0,0,0)'::"cube", 1, 2);
       cube_enlarge      
 ------------------------
  (-1, -1, -1),(1, 1, 1)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 1, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", 1, 2);
   cube_enlarge   
 -----------------
  (-4, -3),(3, 8)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 3, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", 3, 2);
    cube_enlarge   
 ------------------
  (-6, -5),(5, 10)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -1, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", -1, 2);
   cube_enlarge   
 -----------------
  (-2, -1),(1, 6)
 (1 row)
 
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", -3, 2);
     cube_enlarge     
 ---------------------
  (-0.5, 1),(-0.5, 4)
 (1 row)
 
-SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -23, 5);
+SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::"cube", -23, 5);
  cube_enlarge 
 --------------
  (42, 0, 0)
 (1 row)
 
-SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -24, 5);
+SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::"cube", -24, 5);
  cube_enlarge 
 --------------
  (42, 0, 0)
@@ -1293,31 +1293,31 @@ SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -24, 5);
 
 -- Test of cube_union (MBR for two cubes)
 --
-SELECT cube_union('(1,2),(3,4)'::cube, '(5,6,7),(8,9,10)'::cube);
+SELECT cube_union('(1,2),(3,4)'::"cube", '(5,6,7),(8,9,10)'::"cube");
       cube_union      
 ----------------------
  (1, 2, 0),(8, 9, 10)
 (1 row)
 
-SELECT cube_union('(1,2)'::cube, '(4,2,0,0)'::cube);
+SELECT cube_union('(1,2)'::"cube", '(4,2,0,0)'::"cube");
         cube_union         
 ---------------------------
  (1, 2, 0, 0),(4, 2, 0, 0)
 (1 row)
 
-SELECT cube_union('(1,2),(1,2)'::cube, '(4,2),(4,2)'::cube);
+SELECT cube_union('(1,2),(1,2)'::"cube", '(4,2),(4,2)'::"cube");
   cube_union   
 ---------------
  (1, 2),(4, 2)
 (1 row)
 
-SELECT cube_union('(1,2),(1,2)'::cube, '(1,2),(1,2)'::cube);
+SELECT cube_union('(1,2),(1,2)'::"cube", '(1,2),(1,2)'::"cube");
  cube_union 
 ------------
  (1, 2)
 (1 row)
 
-SELECT cube_union('(1,2),(1,2)'::cube, '(1,2,0),(1,2,0)'::cube);
+SELECT cube_union('(1,2),(1,2)'::"cube", '(1,2,0),(1,2,0)'::"cube");
  cube_union 
 ------------
  (1, 2, 0)
@@ -1325,43 +1325,43 @@ SELECT cube_union('(1,2),(1,2)'::cube, '(1,2,0),(1,2,0)'::cube);
 
 -- Test of cube_inter
 --
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,4), (16,15)'::cube); -- intersects
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,4), (16,15)'::"cube"); -- intersects
    cube_inter    
 -----------------
  (3, 4),(10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,4), (6,5)'::cube); -- includes
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,4), (6,5)'::"cube"); -- includes
   cube_inter   
 ---------------
  (3, 4),(6, 5)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(13,14), (16,15)'::cube); -- no intersection
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(13,14), (16,15)'::"cube"); -- no intersection
     cube_inter     
 -------------------
  (13, 14),(10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,14), (16,15)'::cube); -- no intersection, but one dimension intersects
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,14), (16,15)'::"cube"); -- no intersection, but one dimension intersects
     cube_inter    
 ------------------
  (3, 14),(10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2),(10,11)'::cube, '(10,11), (16,15)'::cube); -- point intersection
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(10,11), (16,15)'::"cube"); -- point intersection
  cube_inter 
 ------------
  (10, 11)
 (1 row)
 
-SELECT cube_inter('(1,2,3)'::cube, '(1,2,3)'::cube); -- point args
+SELECT cube_inter('(1,2,3)'::"cube", '(1,2,3)'::"cube"); -- point args
  cube_inter 
 ------------
  (1, 2, 3)
 (1 row)
 
-SELECT cube_inter('(1,2,3)'::cube, '(5,6,3)'::cube); -- point args
+SELECT cube_inter('(1,2,3)'::"cube", '(5,6,3)'::"cube"); -- point args
      cube_inter      
 ---------------------
  (5, 6, 3),(1, 2, 3)
@@ -1369,13 +1369,13 @@ SELECT cube_inter('(1,2,3)'::cube, '(5,6,3)'::cube); -- point args
 
 -- Test of cube_size
 --
-SELECT cube_size('(4,8),(15,16)'::cube);
+SELECT cube_size('(4,8),(15,16)'::"cube");
  cube_size 
 -----------
         88
 (1 row)
 
-SELECT cube_size('(42,137)'::cube);
+SELECT cube_size('(42,137)'::"cube");
  cube_size 
 -----------
          0
@@ -1383,7 +1383,7 @@ SELECT cube_size('(42,137)'::cube);
 
 -- Load some example data and build the index
 --
-CREATE TABLE test_cube (c cube);
+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)' ORDER BY c;
diff --git a/contrib/cube/sql/cube.sql b/contrib/cube/sql/cube.sql
index d58974c..da80472 100644
--- a/contrib/cube/sql/cube.sql
+++ b/contrib/cube/sql/cube.sql
@@ -2,141 +2,141 @@
 --  Test cube datatype
 --
 
-CREATE EXTENSION cube;
+CREATE EXTENSION "cube";
 
 --
 -- testing the input and output functions
 --
 
 -- Any number (a one-dimensional point)
-SELECT '1'::cube AS cube;
-SELECT '-1'::cube AS cube;
-SELECT '1.'::cube AS cube;
-SELECT '-1.'::cube AS cube;
-SELECT '.1'::cube AS cube;
-SELECT '-.1'::cube AS cube;
-SELECT '1.0'::cube AS cube;
-SELECT '-1.0'::cube AS cube;
-SELECT '1e27'::cube AS cube;
-SELECT '-1e27'::cube AS cube;
-SELECT '1.0e27'::cube AS cube;
-SELECT '-1.0e27'::cube AS cube;
-SELECT '1e+27'::cube AS cube;
-SELECT '-1e+27'::cube AS cube;
-SELECT '1.0e+27'::cube AS cube;
-SELECT '-1.0e+27'::cube AS cube;
-SELECT '1e-7'::cube AS cube;
-SELECT '-1e-7'::cube AS cube;
-SELECT '1.0e-7'::cube AS cube;
-SELECT '-1.0e-7'::cube AS cube;
-SELECT '1e-700'::cube AS cube;
-SELECT '-1e-700'::cube AS cube;
-SELECT '1234567890123456'::cube AS cube;
-SELECT '+1234567890123456'::cube AS cube;
-SELECT '-1234567890123456'::cube AS cube;
-SELECT '.1234567890123456'::cube AS cube;
-SELECT '+.1234567890123456'::cube AS cube;
-SELECT '-.1234567890123456'::cube AS cube;
+SELECT '1'::"cube" AS "cube";
+SELECT '-1'::"cube" AS "cube";
+SELECT '1.'::"cube" AS "cube";
+SELECT '-1.'::"cube" AS "cube";
+SELECT '.1'::"cube" AS "cube";
+SELECT '-.1'::"cube" AS "cube";
+SELECT '1.0'::"cube" AS "cube";
+SELECT '-1.0'::"cube" AS "cube";
+SELECT '1e27'::"cube" AS "cube";
+SELECT '-1e27'::"cube" AS "cube";
+SELECT '1.0e27'::"cube" AS "cube";
+SELECT '-1.0e27'::"cube" AS "cube";
+SELECT '1e+27'::"cube" AS "cube";
+SELECT '-1e+27'::"cube" AS "cube";
+SELECT '1.0e+27'::"cube" AS "cube";
+SELECT '-1.0e+27'::"cube" AS "cube";
+SELECT '1e-7'::"cube" AS "cube";
+SELECT '-1e-7'::"cube" AS "cube";
+SELECT '1.0e-7'::"cube" AS "cube";
+SELECT '-1.0e-7'::"cube" AS "cube";
+SELECT '1e-700'::"cube" AS "cube";
+SELECT '-1e-700'::"cube" AS "cube";
+SELECT '1234567890123456'::"cube" AS "cube";
+SELECT '+1234567890123456'::"cube" AS "cube";
+SELECT '-1234567890123456'::"cube" AS "cube";
+SELECT '.1234567890123456'::"cube" AS "cube";
+SELECT '+.1234567890123456'::"cube" AS "cube";
+SELECT '-.1234567890123456'::"cube" AS "cube";
 
 -- simple lists (points)
-SELECT '1,2'::cube AS cube;
-SELECT '(1,2)'::cube AS cube;
-SELECT '1,2,3,4,5'::cube AS cube;
-SELECT '(1,2,3,4,5)'::cube AS cube;
+SELECT '1,2'::"cube" AS "cube";
+SELECT '(1,2)'::"cube" AS "cube";
+SELECT '1,2,3,4,5'::"cube" AS "cube";
+SELECT '(1,2,3,4,5)'::"cube" AS "cube";
 
 -- double lists (cubes)
-SELECT '(0),(0)'::cube AS cube;
-SELECT '(0),(1)'::cube AS cube;
-SELECT '[(0),(0)]'::cube AS cube;
-SELECT '[(0),(1)]'::cube AS cube;
-SELECT '(0,0,0,0),(0,0,0,0)'::cube AS cube;
-SELECT '(0,0,0,0),(1,0,0,0)'::cube AS cube;
-SELECT '[(0,0,0,0),(0,0,0,0)]'::cube AS cube;
-SELECT '[(0,0,0,0),(1,0,0,0)]'::cube AS cube;
+SELECT '(0),(0)'::"cube" AS "cube";
+SELECT '(0),(1)'::"cube" AS "cube";
+SELECT '[(0),(0)]'::"cube" AS "cube";
+SELECT '[(0),(1)]'::"cube" AS "cube";
+SELECT '(0,0,0,0),(0,0,0,0)'::"cube" AS "cube";
+SELECT '(0,0,0,0),(1,0,0,0)'::"cube" AS "cube";
+SELECT '[(0,0,0,0),(0,0,0,0)]'::"cube" AS "cube";
+SELECT '[(0,0,0,0),(1,0,0,0)]'::"cube" AS "cube";
 
 -- invalid input: parse errors
-SELECT ''::cube AS cube;
-SELECT 'ABC'::cube AS cube;
-SELECT '()'::cube AS cube;
-SELECT '[]'::cube AS cube;
-SELECT '[()]'::cube AS cube;
-SELECT '[(1)]'::cube AS cube;
-SELECT '[(1),]'::cube AS cube;
-SELECT '[(1),2]'::cube AS cube;
-SELECT '[(1),(2),(3)]'::cube AS cube;
-SELECT '1,'::cube AS cube;
-SELECT '1,2,'::cube AS cube;
-SELECT '1,,2'::cube AS cube;
-SELECT '(1,)'::cube AS cube;
-SELECT '(1,2,)'::cube AS cube;
-SELECT '(1,,2)'::cube AS cube;
+SELECT ''::"cube" AS "cube";
+SELECT 'ABC'::"cube" AS "cube";
+SELECT '()'::"cube" AS "cube";
+SELECT '[]'::"cube" AS "cube";
+SELECT '[()]'::"cube" AS "cube";
+SELECT '[(1)]'::"cube" AS "cube";
+SELECT '[(1),]'::"cube" AS "cube";
+SELECT '[(1),2]'::"cube" AS "cube";
+SELECT '[(1),(2),(3)]'::"cube" AS "cube";
+SELECT '1,'::"cube" AS "cube";
+SELECT '1,2,'::"cube" AS "cube";
+SELECT '1,,2'::"cube" AS "cube";
+SELECT '(1,)'::"cube" AS "cube";
+SELECT '(1,2,)'::"cube" AS "cube";
+SELECT '(1,,2)'::"cube" AS "cube";
 
 -- invalid input: semantic errors and trailing garbage
-SELECT '[(1),(2)],'::cube AS cube; -- 0
-SELECT '[(1,2,3),(2,3)]'::cube AS cube; -- 1
-SELECT '[(1,2),(1,2,3)]'::cube AS cube; -- 1
-SELECT '(1),(2),'::cube AS cube; -- 2
-SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
-SELECT '(1,2),(1,2,3)'::cube AS cube; -- 3
-SELECT '(1,2,3)ab'::cube AS cube; -- 4
-SELECT '(1,2,3)a'::cube AS cube; -- 5
-SELECT '(1,2)('::cube AS cube; -- 5
-SELECT '1,2ab'::cube AS cube; -- 6
-SELECT '1 e7'::cube AS cube; -- 6
-SELECT '1,2a'::cube AS cube; -- 7
-SELECT '1..2'::cube AS cube; -- 7
+SELECT '[(1),(2)],'::"cube" AS "cube"; -- 0
+SELECT '[(1,2,3),(2,3)]'::"cube" AS "cube"; -- 1
+SELECT '[(1,2),(1,2,3)]'::"cube" AS "cube"; -- 1
+SELECT '(1),(2),'::"cube" AS "cube"; -- 2
+SELECT '(1,2,3),(2,3)'::"cube" AS "cube"; -- 3
+SELECT '(1,2),(1,2,3)'::"cube" AS "cube"; -- 3
+SELECT '(1,2,3)ab'::"cube" AS "cube"; -- 4
+SELECT '(1,2,3)a'::"cube" AS "cube"; -- 5
+SELECT '(1,2)('::"cube" AS "cube"; -- 5
+SELECT '1,2ab'::"cube" AS "cube"; -- 6
+SELECT '1 e7'::"cube" AS "cube"; -- 6
+SELECT '1,2a'::"cube" AS "cube"; -- 7
+SELECT '1..2'::"cube" AS "cube"; -- 7
 
 --
 -- Testing building cubes from float8 values
 --
 
-SELECT cube(0::float8);
-SELECT cube(1::float8);
-SELECT cube(1,2);
-SELECT cube(cube(1,2),3);
-SELECT cube(cube(1,2),3,4);
-SELECT cube(cube(cube(1,2),3,4),5);
-SELECT cube(cube(cube(1,2),3,4),5,6);
+SELECT "cube"(0::float8);
+SELECT "cube"(1::float8);
+SELECT "cube"(1,2);
+SELECT "cube"("cube"(1,2),3);
+SELECT "cube"("cube"(1,2),3,4);
+SELECT "cube"("cube"("cube"(1,2),3,4),5);
+SELECT "cube"("cube"("cube"(1,2),3,4),5,6);
 
 --
--- Test that the text -> cube cast was installed.
+-- Test that the text -> "cube" cast was installed.
 --
 
-SELECT '(0)'::text::cube;
+SELECT '(0)'::text::"cube";
 
 --
--- Test the float[] -> cube cast
+-- Test the float[] -> "cube" cast
 --
-SELECT cube('{0,1,2}'::float[], '{3,4,5}'::float[]);
-SELECT cube('{0,1,2}'::float[], '{3}'::float[]);
-SELECT cube(NULL::float[], '{3}'::float[]);
-SELECT cube('{0,1,2}'::float[]);
-SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]);
-SELECT cube_subset(cube('(1,3,5),(1,3,5)'), ARRAY[3,2,1,1]);
-SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
-SELECT cube_subset(cube('(6,7,8),(6,7,8)'), ARRAY[4,0]);
+SELECT "cube"('{0,1,2}'::float[], '{3,4,5}'::float[]);
+SELECT "cube"('{0,1,2}'::float[], '{3}'::float[]);
+SELECT "cube"(NULL::float[], '{3}'::float[]);
+SELECT "cube"('{0,1,2}'::float[]);
+SELECT cube_subset("cube"('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]);
+SELECT cube_subset("cube"('(1,3,5),(1,3,5)'), ARRAY[3,2,1,1]);
+SELECT cube_subset("cube"('(1,3,5),(6,7,8)'), ARRAY[4,0]);
+SELECT cube_subset("cube"('(6,7,8),(6,7,8)'), ARRAY[4,0]);
 
 --
 -- Test point processing
 --
-SELECT cube('(1,2),(1,2)'); -- cube_in
-SELECT cube('{0,1,2}'::float[], '{0,1,2}'::float[]); -- cube_a_f8_f8
-SELECT cube('{5,6,7,8}'::float[]); -- cube_a_f8
-SELECT cube(1.37); -- cube_f8
-SELECT cube(1.37, 1.37); -- cube_f8_f8
-SELECT cube(cube(1,1), 42); -- cube_c_f8
-SELECT cube(cube(1,2), 42); -- cube_c_f8
-SELECT cube(cube(1,1), 42, 42); -- cube_c_f8_f8
-SELECT cube(cube(1,1), 42, 24); -- cube_c_f8_f8
-SELECT cube(cube(1,2), 42, 42); -- cube_c_f8_f8
-SELECT cube(cube(1,2), 42, 24); -- cube_c_f8_f8
+SELECT "cube"('(1,2),(1,2)'); -- cube_in
+SELECT "cube"('{0,1,2}'::float[], '{0,1,2}'::float[]); -- cube_a_f8_f8
+SELECT "cube"('{5,6,7,8}'::float[]); -- cube_a_f8
+SELECT "cube"(1.37); -- cube_f8
+SELECT "cube"(1.37, 1.37); -- cube_f8_f8
+SELECT "cube"("cube"(1,1), 42); -- cube_c_f8
+SELECT "cube"("cube"(1,2), 42); -- cube_c_f8
+SELECT "cube"("cube"(1,1), 42, 42); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,1), 42, 24); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,2), 42, 42); -- cube_c_f8_f8
+SELECT "cube"("cube"(1,2), 42, 24); -- cube_c_f8_f8
 
 --
 -- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
 --
 
-select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::cube;
-select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::cube;
+select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::"cube";
+select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)'::"cube";
 
 --
 -- testing the  operators
@@ -144,190 +144,190 @@ select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 
 -- equality/inequality:
 --
-SELECT '24, 33.20'::cube    =  '24, 33.20'::cube AS bool;
-SELECT '24, 33.20'::cube    != '24, 33.20'::cube AS bool;
-SELECT '24, 33.20'::cube    =  '24, 33.21'::cube AS bool;
-SELECT '24, 33.20'::cube    != '24, 33.21'::cube AS bool;
-SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
-SELECT '(2,0),(3,1)'::cube  =  '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
+SELECT '24, 33.20'::"cube"    =  '24, 33.20'::"cube" AS bool;
+SELECT '24, 33.20'::"cube"    != '24, 33.20'::"cube" AS bool;
+SELECT '24, 33.20'::"cube"    =  '24, 33.21'::"cube" AS bool;
+SELECT '24, 33.20'::"cube"    != '24, 33.21'::"cube" AS bool;
+SELECT '(2,0),(3,1)'::"cube"  =  '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
+SELECT '(2,0),(3,1)'::"cube"  =  '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
 
 -- "lower than" / "greater than"
 -- (these operators are not useful for anything but ordering)
 --
-SELECT '1'::cube   > '2'::cube AS bool;
-SELECT '1'::cube   < '2'::cube AS bool;
-SELECT '1,1'::cube > '1,2'::cube AS bool;
-SELECT '1,1'::cube < '1,2'::cube AS bool;
-
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,0),(3,1,0,0,1)'::cube AS bool;
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,1),(3,1,0,0,0)'::cube AS bool;
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,1),(3,1,0,0,0)'::cube AS bool;
-SELECT '(2,0),(3,1)'::cube             > '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
-SELECT '(2,0),(3,1)'::cube             < '(2,0,0,0,0),(3,1,0,0,0)'::cube AS bool;
-SELECT '(2,0,0,0,0),(3,1,0,0,1)'::cube > '(2,0),(3,1)'::cube AS bool;
-SELECT '(2,0,0,0,0),(3,1,0,0,1)'::cube < '(2,0),(3,1)'::cube AS bool;
-SELECT '(2,0,0,0,1),(3,1,0,0,0)'::cube > '(2,0),(3,1)'::cube AS bool;
-SELECT '(2,0,0,0,1),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
-SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube > '(2,0),(3,1)'::cube AS bool;
-SELECT '(2,0,0,0,0),(3,1,0,0,0)'::cube < '(2,0),(3,1)'::cube AS bool;
+SELECT '1'::"cube"   > '2'::"cube" AS bool;
+SELECT '1'::"cube"   < '2'::"cube" AS bool;
+SELECT '1,1'::"cube" > '1,2'::"cube" AS bool;
+SELECT '1,1'::"cube" < '1,2'::"cube" AS bool;
+
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,0),(3,1,0,0,1)'::"cube" AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,1),(3,1,0,0,0)'::"cube" AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,1),(3,1,0,0,0)'::"cube" AS bool;
+SELECT '(2,0),(3,1)'::"cube"             > '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
+SELECT '(2,0),(3,1)'::"cube"             < '(2,0,0,0,0),(3,1,0,0,0)'::"cube" AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,1)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,1)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
+SELECT '(2,0,0,0,1),(3,1,0,0,0)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
+SELECT '(2,0,0,0,1),(3,1,0,0,0)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,0)'::"cube" > '(2,0),(3,1)'::"cube" AS bool;
+SELECT '(2,0,0,0,0),(3,1,0,0,0)'::"cube" < '(2,0),(3,1)'::"cube" AS bool;
 
 
 -- "overlap"
 --
-SELECT '1'::cube && '1'::cube AS bool;
-SELECT '1'::cube && '2'::cube AS bool;
+SELECT '1'::"cube" && '1'::"cube" AS bool;
+SELECT '1'::"cube" && '2'::"cube" AS bool;
 
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '0'::cube AS bool;
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '1'::cube AS bool;
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '1,1,1'::cube AS bool;
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(1,1,1),(2,2,2)]'::cube AS bool;
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(1,1),(2,2)]'::cube AS bool;
-SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(2,1,1),(2,2,2)]'::cube AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '0'::"cube" AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '1'::"cube" AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '1,1,1'::"cube" AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(1,1,1),(2,2,2)]'::"cube" AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(1,1),(2,2)]'::"cube" AS bool;
+SELECT '[(-1,-1,-1),(1,1,1)]'::"cube" && '[(2,1,1),(2,2,2)]'::"cube" AS bool;
 
 
--- "contained in" (the left operand is the cube entirely enclosed by
+-- "contained in" (the left operand is the "cube" entirely enclosed by
 -- the right operand):
 --
-SELECT '0'::cube                 <@ '0'::cube                        AS bool;
-SELECT '0,0,0'::cube             <@ '0,0,0'::cube                    AS bool;
-SELECT '0,0'::cube               <@ '0,0,1'::cube                    AS bool;
-SELECT '0,0,0'::cube             <@ '0,0,1'::cube                    AS bool;
-SELECT '1,0,0'::cube             <@ '0,0,1'::cube                    AS bool;
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(1,0,0),(0,0,1)'::cube          AS bool;
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(-1,-1,-1),(1,1,1)'::cube       AS bool;
-SELECT '(1,0,0),(0,0,1)'::cube   <@ '(-1,-1,-1,-1),(1,1,1,1)'::cube  AS bool;
-SELECT '0'::cube                 <@ '(-1),(1)'::cube                 AS bool;
-SELECT '1'::cube                 <@ '(-1),(1)'::cube                 AS bool;
-SELECT '-1'::cube                <@ '(-1),(1)'::cube                 AS bool;
-SELECT '(-1),(1)'::cube          <@ '(-1),(1)'::cube                 AS bool;
-SELECT '(-1),(1)'::cube          <@ '(-1,-1),(1,1)'::cube            AS bool;
-SELECT '(-2),(1)'::cube          <@ '(-1),(1)'::cube                 AS bool;
-SELECT '(-2),(1)'::cube          <@ '(-1,-1),(1,1)'::cube            AS bool;
-
-
--- "contains" (the left operand is the cube that entirely encloses the
+SELECT '0'::"cube"                 <@ '0'::"cube"                        AS bool;
+SELECT '0,0,0'::"cube"             <@ '0,0,0'::"cube"                    AS bool;
+SELECT '0,0'::"cube"               <@ '0,0,1'::"cube"                    AS bool;
+SELECT '0,0,0'::"cube"             <@ '0,0,1'::"cube"                    AS bool;
+SELECT '1,0,0'::"cube"             <@ '0,0,1'::"cube"                    AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(1,0,0),(0,0,1)'::"cube"          AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(-1,-1,-1),(1,1,1)'::"cube"       AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"   <@ '(-1,-1,-1,-1),(1,1,1,1)'::"cube"  AS bool;
+SELECT '0'::"cube"                 <@ '(-1),(1)'::"cube"                 AS bool;
+SELECT '1'::"cube"                 <@ '(-1),(1)'::"cube"                 AS bool;
+SELECT '-1'::"cube"                <@ '(-1),(1)'::"cube"                 AS bool;
+SELECT '(-1),(1)'::"cube"          <@ '(-1),(1)'::"cube"                 AS bool;
+SELECT '(-1),(1)'::"cube"          <@ '(-1,-1),(1,1)'::"cube"            AS bool;
+SELECT '(-2),(1)'::"cube"          <@ '(-1),(1)'::"cube"                 AS bool;
+SELECT '(-2),(1)'::"cube"          <@ '(-1,-1),(1,1)'::"cube"            AS bool;
+
+
+-- "contains" (the left operand is the "cube" that entirely encloses the
 -- right operand)
 --
-SELECT '0'::cube                        @> '0'::cube                 AS bool;
-SELECT '0,0,0'::cube                    @> '0,0,0'::cube             AS bool;
-SELECT '0,0,1'::cube                    @> '0,0'::cube               AS bool;
-SELECT '0,0,1'::cube                    @> '0,0,0'::cube             AS bool;
-SELECT '0,0,1'::cube                    @> '1,0,0'::cube             AS bool;
-SELECT '(1,0,0),(0,0,1)'::cube          @> '(1,0,0),(0,0,1)'::cube   AS bool;
-SELECT '(-1,-1,-1),(1,1,1)'::cube       @> '(1,0,0),(0,0,1)'::cube   AS bool;
-SELECT '(-1,-1,-1,-1),(1,1,1,1)'::cube  @> '(1,0,0),(0,0,1)'::cube   AS bool;
-SELECT '(-1),(1)'::cube                 @> '0'::cube                 AS bool;
-SELECT '(-1),(1)'::cube                 @> '1'::cube                 AS bool;
-SELECT '(-1),(1)'::cube                 @> '-1'::cube                AS bool;
-SELECT '(-1),(1)'::cube                 @> '(-1),(1)'::cube          AS bool;
-SELECT '(-1,-1),(1,1)'::cube            @> '(-1),(1)'::cube          AS bool;
-SELECT '(-1),(1)'::cube                 @> '(-2),(1)'::cube          AS bool;
-SELECT '(-1,-1),(1,1)'::cube            @> '(-2),(1)'::cube          AS bool;
+SELECT '0'::"cube"                        @> '0'::"cube"                 AS bool;
+SELECT '0,0,0'::"cube"                    @> '0,0,0'::"cube"             AS bool;
+SELECT '0,0,1'::"cube"                    @> '0,0'::"cube"               AS bool;
+SELECT '0,0,1'::"cube"                    @> '0,0,0'::"cube"             AS bool;
+SELECT '0,0,1'::"cube"                    @> '1,0,0'::"cube"             AS bool;
+SELECT '(1,0,0),(0,0,1)'::"cube"          @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
+SELECT '(-1,-1,-1),(1,1,1)'::"cube"       @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
+SELECT '(-1,-1,-1,-1),(1,1,1,1)'::"cube"  @> '(1,0,0),(0,0,1)'::"cube"   AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '0'::"cube"                 AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '1'::"cube"                 AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '-1'::"cube"                AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '(-1),(1)'::"cube"          AS bool;
+SELECT '(-1,-1),(1,1)'::"cube"            @> '(-1),(1)'::"cube"          AS bool;
+SELECT '(-1),(1)'::"cube"                 @> '(-2),(1)'::"cube"          AS bool;
+SELECT '(-1,-1),(1,1)'::"cube"            @> '(-2),(1)'::"cube"          AS bool;
 
 -- Test of distance function
 --
-SELECT cube_distance('(0)'::cube,'(2,2,2,2)'::cube);
-SELECT cube_distance('(0)'::cube,'(.3,.4)'::cube);
-SELECT cube_distance('(2,3,4)'::cube,'(2,3,4)'::cube);
-SELECT cube_distance('(42,42,42,42)'::cube,'(137,137,137,137)'::cube);
-SELECT cube_distance('(42,42,42)'::cube,'(137,137)'::cube);
+SELECT cube_distance('(0)'::"cube",'(2,2,2,2)'::"cube");
+SELECT cube_distance('(0)'::"cube",'(.3,.4)'::"cube");
+SELECT cube_distance('(2,3,4)'::"cube",'(2,3,4)'::"cube");
+SELECT cube_distance('(42,42,42,42)'::"cube",'(137,137,137,137)'::"cube");
+SELECT cube_distance('(42,42,42)'::"cube",'(137,137)'::"cube");
 
--- Test of cube function (text to cube)
+-- Test of "cube" function (text to "cube")
 --
-SELECT cube('(1,1.2)'::text);
-SELECT cube(NULL);
+SELECT "cube"('(1,1.2)'::text);
+SELECT "cube"(NULL);
 
--- Test of cube_dim function (dimensions stored in cube)
+-- Test of cube_dim function (dimensions stored in "cube")
 --
-SELECT cube_dim('(0)'::cube);
-SELECT cube_dim('(0,0)'::cube);
-SELECT cube_dim('(0,0,0)'::cube);
-SELECT cube_dim('(42,42,42),(42,42,42)'::cube);
-SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::cube);
+SELECT cube_dim('(0)'::"cube");
+SELECT cube_dim('(0,0)'::"cube");
+SELECT cube_dim('(0,0,0)'::"cube");
+SELECT cube_dim('(42,42,42),(42,42,42)'::"cube");
+SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::"cube");
 
 -- Test of cube_ll_coord function (retrieves LL coodinate values)
 --
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 1);
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 2);
-SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 3);
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 1);
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 2);
-SELECT cube_ll_coord('(1,2),(1,2)'::cube, 3);
-SELECT cube_ll_coord('(42,137)'::cube, 1);
-SELECT cube_ll_coord('(42,137)'::cube, 2);
-SELECT cube_ll_coord('(42,137)'::cube, 3);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 1);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 2);
+SELECT cube_ll_coord('(-1,1),(2,-2)'::"cube", 3);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 1);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 2);
+SELECT cube_ll_coord('(1,2),(1,2)'::"cube", 3);
+SELECT cube_ll_coord('(42,137)'::"cube", 1);
+SELECT cube_ll_coord('(42,137)'::"cube", 2);
+SELECT cube_ll_coord('(42,137)'::"cube", 3);
 
 -- Test of cube_ur_coord function (retrieves UR coodinate values)
 --
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 1);
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 2);
-SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 3);
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 1);
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 2);
-SELECT cube_ur_coord('(1,2),(1,2)'::cube, 3);
-SELECT cube_ur_coord('(42,137)'::cube, 1);
-SELECT cube_ur_coord('(42,137)'::cube, 2);
-SELECT cube_ur_coord('(42,137)'::cube, 3);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 1);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 2);
+SELECT cube_ur_coord('(-1,1),(2,-2)'::"cube", 3);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 1);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 2);
+SELECT cube_ur_coord('(1,2),(1,2)'::"cube", 3);
+SELECT cube_ur_coord('(42,137)'::"cube", 1);
+SELECT cube_ur_coord('(42,137)'::"cube", 2);
+SELECT cube_ur_coord('(42,137)'::"cube", 3);
 
 -- Test of cube_is_point
 --
-SELECT cube_is_point('(0)'::cube);
-SELECT cube_is_point('(0,1,2)'::cube);
-SELECT cube_is_point('(0,1,2),(0,1,2)'::cube);
-SELECT cube_is_point('(0,1,2),(-1,1,2)'::cube);
-SELECT cube_is_point('(0,1,2),(0,-1,2)'::cube);
-SELECT cube_is_point('(0,1,2),(0,1,-2)'::cube);
+SELECT cube_is_point('(0)'::"cube");
+SELECT cube_is_point('(0,1,2)'::"cube");
+SELECT cube_is_point('(0,1,2),(0,1,2)'::"cube");
+SELECT cube_is_point('(0,1,2),(-1,1,2)'::"cube");
+SELECT cube_is_point('(0,1,2),(0,-1,2)'::"cube");
+SELECT cube_is_point('(0,1,2),(0,1,-2)'::"cube");
 
 -- Test of cube_enlarge (enlarging and shrinking cubes)
 --
-SELECT cube_enlarge('(0)'::cube, 0, 0);
-SELECT cube_enlarge('(0)'::cube, 0, 1);
-SELECT cube_enlarge('(0)'::cube, 0, 2);
-SELECT cube_enlarge('(2),(-2)'::cube, 0, 4);
-SELECT cube_enlarge('(0)'::cube, 1, 0);
-SELECT cube_enlarge('(0)'::cube, 1, 1);
-SELECT cube_enlarge('(0)'::cube, 1, 2);
-SELECT cube_enlarge('(2),(-2)'::cube, 1, 4);
-SELECT cube_enlarge('(0)'::cube, -1, 0);
-SELECT cube_enlarge('(0)'::cube, -1, 1);
-SELECT cube_enlarge('(0)'::cube, -1, 2);
-SELECT cube_enlarge('(2),(-2)'::cube, -1, 4);
-SELECT cube_enlarge('(0,0,0)'::cube, 1, 0);
-SELECT cube_enlarge('(0,0,0)'::cube, 1, 2);
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 1, 2);
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 3, 2);
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -1, 2);
-SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
-SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -23, 5);
-SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -24, 5);
+SELECT cube_enlarge('(0)'::"cube", 0, 0);
+SELECT cube_enlarge('(0)'::"cube", 0, 1);
+SELECT cube_enlarge('(0)'::"cube", 0, 2);
+SELECT cube_enlarge('(2),(-2)'::"cube", 0, 4);
+SELECT cube_enlarge('(0)'::"cube", 1, 0);
+SELECT cube_enlarge('(0)'::"cube", 1, 1);
+SELECT cube_enlarge('(0)'::"cube", 1, 2);
+SELECT cube_enlarge('(2),(-2)'::"cube", 1, 4);
+SELECT cube_enlarge('(0)'::"cube", -1, 0);
+SELECT cube_enlarge('(0)'::"cube", -1, 1);
+SELECT cube_enlarge('(0)'::"cube", -1, 2);
+SELECT cube_enlarge('(2),(-2)'::"cube", -1, 4);
+SELECT cube_enlarge('(0,0,0)'::"cube", 1, 0);
+SELECT cube_enlarge('(0,0,0)'::"cube", 1, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", 1, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", 3, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", -1, 2);
+SELECT cube_enlarge('(2,-2),(-3,7)'::"cube", -3, 2);
+SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::"cube", -23, 5);
+SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::"cube", -24, 5);
 
 -- Test of cube_union (MBR for two cubes)
 --
-SELECT cube_union('(1,2),(3,4)'::cube, '(5,6,7),(8,9,10)'::cube);
-SELECT cube_union('(1,2)'::cube, '(4,2,0,0)'::cube);
-SELECT cube_union('(1,2),(1,2)'::cube, '(4,2),(4,2)'::cube);
-SELECT cube_union('(1,2),(1,2)'::cube, '(1,2),(1,2)'::cube);
-SELECT cube_union('(1,2),(1,2)'::cube, '(1,2,0),(1,2,0)'::cube);
+SELECT cube_union('(1,2),(3,4)'::"cube", '(5,6,7),(8,9,10)'::"cube");
+SELECT cube_union('(1,2)'::"cube", '(4,2,0,0)'::"cube");
+SELECT cube_union('(1,2),(1,2)'::"cube", '(4,2),(4,2)'::"cube");
+SELECT cube_union('(1,2),(1,2)'::"cube", '(1,2),(1,2)'::"cube");
+SELECT cube_union('(1,2),(1,2)'::"cube", '(1,2,0),(1,2,0)'::"cube");
 
 -- Test of cube_inter
 --
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,4), (16,15)'::cube); -- intersects
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,4), (6,5)'::cube); -- includes
-SELECT cube_inter('(1,2),(10,11)'::cube, '(13,14), (16,15)'::cube); -- no intersection
-SELECT cube_inter('(1,2),(10,11)'::cube, '(3,14), (16,15)'::cube); -- no intersection, but one dimension intersects
-SELECT cube_inter('(1,2),(10,11)'::cube, '(10,11), (16,15)'::cube); -- point intersection
-SELECT cube_inter('(1,2,3)'::cube, '(1,2,3)'::cube); -- point args
-SELECT cube_inter('(1,2,3)'::cube, '(5,6,3)'::cube); -- point args
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,4), (16,15)'::"cube"); -- intersects
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,4), (6,5)'::"cube"); -- includes
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(13,14), (16,15)'::"cube"); -- no intersection
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(3,14), (16,15)'::"cube"); -- no intersection, but one dimension intersects
+SELECT cube_inter('(1,2),(10,11)'::"cube", '(10,11), (16,15)'::"cube"); -- point intersection
+SELECT cube_inter('(1,2,3)'::"cube", '(1,2,3)'::"cube"); -- point args
+SELECT cube_inter('(1,2,3)'::"cube", '(5,6,3)'::"cube"); -- point args
 
 -- Test of cube_size
 --
-SELECT cube_size('(4,8),(15,16)'::cube);
-SELECT cube_size('(42,137)'::cube);
+SELECT cube_size('(4,8),(15,16)'::"cube");
+SELECT cube_size('(42,137)'::"cube");
 
 -- Load some example data and build the index
 --
-CREATE TABLE test_cube (c cube);
+CREATE TABLE test_cube (c "cube");
 
 \copy test_cube from 'data/test_cube.data'
 
diff --git a/contrib/earthdistance/earthdistance--1.0.sql b/contrib/earthdistance/earthdistance--1.0.sql
index 4af9062..ad22f65 100644
--- a/contrib/earthdistance/earthdistance--1.0.sql
+++ b/contrib/earthdistance/earthdistance--1.0.sql
@@ -27,10 +27,10 @@ AS 'SELECT ''6378168''::float8';
 -- and that the point must be very near the surface of the sphere
 -- centered about the origin with the radius of the earth.
 
-CREATE DOMAIN earth AS cube
+CREATE DOMAIN earth AS "cube"
   CONSTRAINT not_point check(cube_is_point(value))
   CONSTRAINT not_3d check(cube_dim(value) <= 3)
-  CONSTRAINT on_surface check(abs(cube_distance(value, '(0)'::cube) /
+  CONSTRAINT on_surface check(abs(cube_distance(value, '(0)'::"cube") /
   earth() - 1) < '10e-7'::float8);
 
 CREATE FUNCTION sec_to_gc(float8)
@@ -49,7 +49,7 @@ CREATE FUNCTION ll_to_earth(float8, float8)
 RETURNS earth
 LANGUAGE SQL
 IMMUTABLE STRICT
-AS 'SELECT cube(cube(cube(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth';
+AS 'SELECT "cube"("cube"("cube"(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth';
 
 CREATE FUNCTION latitude(earth)
 RETURNS float8
@@ -70,7 +70,7 @@ IMMUTABLE STRICT
 AS 'SELECT sec_to_gc(cube_distance($1, $2))';
 
 CREATE FUNCTION earth_box(earth, float8)
-RETURNS cube
+RETURNS "cube"
 LANGUAGE SQL
 IMMUTABLE STRICT
 AS 'SELECT cube_enlarge($1, gc_to_sec($2), 3)';
diff --git a/contrib/earthdistance/expected/earthdistance.out b/contrib/earthdistance/expected/earthdistance.out
index 9bd556f..f99276f 100644
--- a/contrib/earthdistance/expected/earthdistance.out
+++ b/contrib/earthdistance/expected/earthdistance.out
@@ -9,7 +9,7 @@
 --
 CREATE EXTENSION earthdistance;  -- fail, must install cube first
 ERROR:  required extension "cube" is not installed
-CREATE EXTENSION cube;
+CREATE EXTENSION "cube";
 CREATE EXTENSION earthdistance;
 --
 -- The radius of the Earth we are using.
@@ -892,7 +892,7 @@ SELECT cube_dim(ll_to_earth(0,0)) <= 3;
  t
 (1 row)
 
-SELECT abs(cube_distance(ll_to_earth(0,0), '(0)'::cube) / earth() - 1) <
+SELECT abs(cube_distance(ll_to_earth(0,0), '(0)'::"cube") / earth() - 1) <
        '10e-12'::float8;
  ?column? 
 ----------
@@ -910,7 +910,7 @@ SELECT cube_dim(ll_to_earth(30,60)) <= 3;
  t
 (1 row)
 
-SELECT abs(cube_distance(ll_to_earth(30,60), '(0)'::cube) / earth() - 1) <
+SELECT abs(cube_distance(ll_to_earth(30,60), '(0)'::"cube") / earth() - 1) <
        '10e-12'::float8;
  ?column? 
 ----------
@@ -928,7 +928,7 @@ SELECT cube_dim(ll_to_earth(60,90)) <= 3;
  t
 (1 row)
 
-SELECT abs(cube_distance(ll_to_earth(60,90), '(0)'::cube) / earth() - 1) <
+SELECT abs(cube_distance(ll_to_earth(60,90), '(0)'::"cube") / earth() - 1) <
        '10e-12'::float8;
  ?column? 
 ----------
@@ -946,7 +946,7 @@ SELECT cube_dim(ll_to_earth(-30,-90)) <= 3;
  t
 (1 row)
 
-SELECT abs(cube_distance(ll_to_earth(-30,-90), '(0)'::cube) / earth() - 1) <
+SELECT abs(cube_distance(ll_to_earth(-30,-90), '(0)'::"cube") / earth() - 1) <
        '10e-12'::float8;
  ?column? 
 ----------
@@ -959,35 +959,35 @@ SELECT abs(cube_distance(ll_to_earth(-30,-90), '(0)'::cube) / earth() - 1) <
 -- list what's installed
 \dT
                                               List of data types
- Schema | Name  |                                         Description                                         
---------+-------+---------------------------------------------------------------------------------------------
- public | cube  | multi-dimensional cube '(FLOAT-1, FLOAT-2, ..., FLOAT-N), (FLOAT-1, FLOAT-2, ..., FLOAT-N)'
- public | earth | 
+ Schema |  Name  |                                         Description                                         
+--------+--------+---------------------------------------------------------------------------------------------
+ public | "cube" | multi-dimensional cube '(FLOAT-1, FLOAT-2, ..., FLOAT-N), (FLOAT-1, FLOAT-2, ..., FLOAT-N)'
+ public | earth  | 
 (2 rows)
 
-drop extension cube;  -- fail, earthdistance requires it
+drop extension "cube";  -- fail, earthdistance requires it
 ERROR:  cannot drop extension cube because other objects depend on it
 DETAIL:  extension earthdistance depends on extension cube
 HINT:  Use DROP ... CASCADE to drop the dependent objects too.
 drop extension earthdistance;
-drop type cube;  -- fail, extension cube requires it
-ERROR:  cannot drop type cube because extension cube requires it
+drop type "cube";  -- fail, extension cube requires it
+ERROR:  cannot drop type "cube" because extension cube requires it
 HINT:  You can drop extension cube instead.
 -- list what's installed
 \dT
-                                             List of data types
- Schema | Name |                                         Description                                         
---------+------+---------------------------------------------------------------------------------------------
- public | cube | multi-dimensional cube '(FLOAT-1, FLOAT-2, ..., FLOAT-N), (FLOAT-1, FLOAT-2, ..., FLOAT-N)'
+                                              List of data types
+ Schema |  Name  |                                         Description                                         
+--------+--------+---------------------------------------------------------------------------------------------
+ public | "cube" | multi-dimensional cube '(FLOAT-1, FLOAT-2, ..., FLOAT-N), (FLOAT-1, FLOAT-2, ..., FLOAT-N)'
 (1 row)
 
-create table foo (f1 cube, f2 int);
-drop extension cube;  -- fail, foo.f1 requires it
+create table foo (f1 "cube", f2 int);
+drop extension "cube";  -- fail, foo.f1 requires it
 ERROR:  cannot drop extension cube because other objects depend on it
-DETAIL:  table foo column f1 depends on type cube
+DETAIL:  table foo column f1 depends on type "cube"
 HINT:  Use DROP ... CASCADE to drop the dependent objects too.
 drop table foo;
-drop extension cube;
+drop extension "cube";
 -- list what's installed
 \dT
      List of data types
@@ -1008,7 +1008,7 @@ drop extension cube;
 (0 rows)
 
 create schema c;
-create extension cube with schema c;
+create extension "cube" with schema c;
 -- list what's installed
 \dT public.*
      List of data types
@@ -1029,23 +1029,23 @@ create extension cube with schema c;
 (0 rows)
 
 \dT c.*
-                                              List of data types
- Schema |  Name  |                                         Description                                         
---------+--------+---------------------------------------------------------------------------------------------
- c      | c.cube | multi-dimensional cube '(FLOAT-1, FLOAT-2, ..., FLOAT-N), (FLOAT-1, FLOAT-2, ..., FLOAT-N)'
+                                               List of data types
+ Schema |   Name   |                                         Description                                         
+--------+----------+---------------------------------------------------------------------------------------------
+ c      | c."cube" | multi-dimensional cube '(FLOAT-1, FLOAT-2, ..., FLOAT-N), (FLOAT-1, FLOAT-2, ..., FLOAT-N)'
 (1 row)
 
-create table foo (f1 c.cube, f2 int);
-drop extension cube;  -- fail, foo.f1 requires it
+create table foo (f1 c."cube", f2 int);
+drop extension "cube";  -- fail, foo.f1 requires it
 ERROR:  cannot drop extension cube because other objects depend on it
-DETAIL:  table foo column f1 depends on type c.cube
+DETAIL:  table foo column f1 depends on type c."cube"
 HINT:  Use DROP ... CASCADE to drop the dependent objects too.
 drop schema c;  -- fail, cube requires it
 ERROR:  cannot drop schema c because other objects depend on it
 DETAIL:  extension cube depends on schema c
-table foo column f1 depends on type c.cube
+table foo column f1 depends on type c."cube"
 HINT:  Use DROP ... CASCADE to drop the dependent objects too.
-drop extension cube cascade;
+drop extension "cube" cascade;
 NOTICE:  drop cascades to table foo column f1
 \d foo
       Table "public.foo"
diff --git a/contrib/earthdistance/sql/earthdistance.sql b/contrib/earthdistance/sql/earthdistance.sql
index 8604502..35dd9b8 100644
--- a/contrib/earthdistance/sql/earthdistance.sql
+++ b/contrib/earthdistance/sql/earthdistance.sql
@@ -9,7 +9,7 @@
 --
 
 CREATE EXTENSION earthdistance;  -- fail, must install cube first
-CREATE EXTENSION cube;
+CREATE EXTENSION "cube";
 CREATE EXTENSION earthdistance;
 
 --
@@ -284,19 +284,19 @@ SELECT earth_box(ll_to_earth(90,180),
 
 SELECT is_point(ll_to_earth(0,0));
 SELECT cube_dim(ll_to_earth(0,0)) <= 3;
-SELECT abs(cube_distance(ll_to_earth(0,0), '(0)'::cube) / earth() - 1) <
+SELECT abs(cube_distance(ll_to_earth(0,0), '(0)'::"cube") / earth() - 1) <
        '10e-12'::float8;
 SELECT is_point(ll_to_earth(30,60));
 SELECT cube_dim(ll_to_earth(30,60)) <= 3;
-SELECT abs(cube_distance(ll_to_earth(30,60), '(0)'::cube) / earth() - 1) <
+SELECT abs(cube_distance(ll_to_earth(30,60), '(0)'::"cube") / earth() - 1) <
        '10e-12'::float8;
 SELECT is_point(ll_to_earth(60,90));
 SELECT cube_dim(ll_to_earth(60,90)) <= 3;
-SELECT abs(cube_distance(ll_to_earth(60,90), '(0)'::cube) / earth() - 1) <
+SELECT abs(cube_distance(ll_to_earth(60,90), '(0)'::"cube") / earth() - 1) <
        '10e-12'::float8;
 SELECT is_point(ll_to_earth(-30,-90));
 SELECT cube_dim(ll_to_earth(-30,-90)) <= 3;
-SELECT abs(cube_distance(ll_to_earth(-30,-90), '(0)'::cube) / earth() - 1) <
+SELECT abs(cube_distance(ll_to_earth(-30,-90), '(0)'::"cube") / earth() - 1) <
        '10e-12'::float8;
 
 --
@@ -306,22 +306,22 @@ SELECT abs(cube_distance(ll_to_earth(-30,-90), '(0)'::cube) / earth() - 1) <
 -- list what's installed
 \dT
 
-drop extension cube;  -- fail, earthdistance requires it
+drop extension "cube";  -- fail, earthdistance requires it
 
 drop extension earthdistance;
 
-drop type cube;  -- fail, extension cube requires it
+drop type "cube";  -- fail, extension cube requires it
 
 -- list what's installed
 \dT
 
-create table foo (f1 cube, f2 int);
+create table foo (f1 "cube", f2 int);
 
-drop extension cube;  -- fail, foo.f1 requires it
+drop extension "cube";  -- fail, foo.f1 requires it
 
 drop table foo;
 
-drop extension cube;
+drop extension "cube";
 
 -- list what's installed
 \dT
@@ -330,7 +330,7 @@ drop extension cube;
 
 create schema c;
 
-create extension cube with schema c;
+create extension "cube" with schema c;
 
 -- list what's installed
 \dT public.*
@@ -338,13 +338,13 @@ create extension cube with schema c;
 \do public.*
 \dT c.*
 
-create table foo (f1 c.cube, f2 int);
+create table foo (f1 c."cube", f2 int);
 
-drop extension cube;  -- fail, foo.f1 requires it
+drop extension "cube";  -- fail, foo.f1 requires it
 
 drop schema c;  -- fail, cube requires it
 
-drop extension cube cascade;
+drop extension "cube" cascade;
 
 \d foo
 
