Index: src/backend/commands/indexcmds.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/commands/indexcmds.c,v
retrieving revision 1.80
diff -c -r1.80 indexcmds.c
*** src/backend/commands/indexcmds.c	2002/08/02 18:15:06	1.80
--- src/backend/commands/indexcmds.c	2002/08/11 21:14:13
***************
*** 482,487 ****
--- 482,490 ----
  	Oid			exactOid = InvalidOid;
  	Oid			compatibleOid = InvalidOid;
  
+ 	/* It could be a domain */
+ 	attrType = getBaseType(attrType);
+ 
  	/*
  	 * We scan through all the opclasses available for the access method,
  	 * looking for one that is marked default and matches the target type
