diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index 71d4df9..e227fa8 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -752,11 +752,13 @@ DefineDomain(CreateDomainStmt *stmt)
 	ListCell   *listptr;
 	Oid			basetypeoid;
 	Oid			old_type_oid;
+	Oid         array_oid;
 	Oid			domaincoll;
 	Form_pg_type baseType;
 	int32		basetypeMod;
 	Oid			baseColl;
 	ObjectAddress address;
+	char       *array_type;
 
 	/* Convert list of names to a name and namespace */
 	domainNamespace = QualifiedNameGetCreationNamespace(stmt->domainname,
@@ -1023,6 +1025,14 @@ DefineDomain(CreateDomainStmt *stmt)
 		}
 	}
 
+
+	/*
+	 * OK, we're done checking, time to make the type.  We must assign the
+	 * array type OID ahead of calling TypeCreate, since the base type and
+	 * array type each refer to the other.
+	 */
+	array_oid = AssignTypeArrayOid();
+
 	/*
 	 * Have TypeCreate do all the real work.
 	 */
@@ -1047,7 +1057,7 @@ DefineDomain(CreateDomainStmt *stmt)
 				   analyzeProcedure,	/* analyze procedure */
 				   InvalidOid,	/* no array element type */
 				   false,		/* this isn't an array */
-				   InvalidOid,	/* no arrays for domains (yet) */
+				   array_oid,	/* array type we are about to create */
 				   basetypeoid, /* base type ID */
 				   defaultValue,	/* default type value (text) */
 				   defaultValueBin,		/* default type value (binary) */
@@ -1060,6 +1070,48 @@ DefineDomain(CreateDomainStmt *stmt)
 				   domaincoll); /* type's collation */
 
 	/*
+	 * Create the array type that goes with it.
+	 */
+	array_type = makeArrayTypeName(domainName, domainNamespace);
+
+/* alignment must be 'i' or 'd' for arrays */
+	alignment = (alignment == 'd') ? 'd' : 'i';
+
+	TypeCreate(array_oid,/* force assignment of this type OID */
+			   array_type,/* type name */
+			   domainNamespace,/* namespace */
+			   InvalidOid,/* relation oid (n/a here) */
+			   0,/* relation kind (ditto) */
+			   GetUserId(),/* owner's ID */
+			   -1,/* internal size (always varlena) */
+			   TYPTYPE_BASE,/* type-type (base type) */
+			   TYPCATEGORY_ARRAY,/* type-category (array) */
+			   false,/* array types are never preferred */
+			   delimiter,/* array element delimiter */
+			   F_ARRAY_IN,/* input procedure */
+			   F_ARRAY_OUT,/* output procedure */
+			   F_ARRAY_RECV,/* receive procedure */
+			   F_ARRAY_SEND,/* send procedure */
+			   InvalidOid,/* typmodin procedure */
+			   InvalidOid,/* typmodout procedure */
+			   F_ARRAY_TYPANALYZE,/* analyze procedure */
+			   address.objectId,/* element type ID */
+			   true,/* yes this is an array type */
+			   InvalidOid,/* no further array type */
+			   InvalidOid,/* base type ID */
+			   NULL,/* never a default type value */
+			   NULL,/* binary default isn't sent either */
+			   false,/* never passed by value */
+			   alignment,/* see above */
+			   'x',/* ARRAY is always toastable */
+			   -1,/* typMod (Domains only) */
+			   0,/* Array dimensions of typbasetype */
+			   false,/* Type NOT NULL */
+			   domaincoll);/* type's collation */
+
+	pfree(array_type);
+
+    /*
 	 * Process constraints which refer to the domain ID returned by TypeCreate
 	 */
 	foreach(listptr, schema)
@@ -2846,8 +2898,6 @@ get_rels_with_domain(Oid domainOid, LOCKMODE lockmode)
 		/* Check for directly dependent types --- must be domains */
 		if (pg_depend->classid == TypeRelationId)
 		{
-			Assert(get_typtype(pg_depend->objid) == TYPTYPE_DOMAIN);
-
 			/*
 			 * Recursively add dependent columns to the output list.  This is
 			 * a bit inefficient since we may fail to combine RelToCheck
diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c
index c0ca58b..df4674f 100644
--- a/src/backend/executor/execQual.c
+++ b/src/backend/executor/execQual.c
@@ -4807,9 +4807,6 @@ ExecInitExpr(Expr *node, PlanState *parent)
 					ereport(ERROR,
 							(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
 							 errmsg("target type is not an array")));
-				/* Arrays over domains aren't supported yet */
-				Assert(getBaseType(astate->resultelemtype) ==
-					   astate->resultelemtype);
 				astate->elemfunc.fn_oid = InvalidOid;	/* not initialized */
 				astate->amstate = (ArrayMapState *) palloc0(sizeof(ArrayMapState));
 				state = (ExprState *) astate;
