*** tsvector.c	Tue Jun 19 12:39:06 2007
--- tsvector.c.patched	Tue Jun 19 12:38:37 2007
*************** tsearch2(PG_FUNCTION_ARGS)
*** 890,895 ****
--- 890,896 ----
  			continue;
  		}
  		oidtype = SPI_gettypeid(rel->rd_att, numattr);
+ 		oidtype = getBaseType(oidtype);
  		/* We assume char() and varchar() are binary-equivalent to text */
  		if (!(oidtype == TEXTOID ||
  			  oidtype == VARCHAROID ||
