Index: src/backend/utils/adt/selfuncs.c =================================================================== RCS file: /opt/src/cvs/pgsql-server/src/backend/utils/adt/selfuncs.c,v retrieving revision 1.112 diff -c -r1.112 selfuncs.c *** src/backend/utils/adt/selfuncs.c 20 Jun 2002 20:29:38 -0000 1.112 --- src/backend/utils/adt/selfuncs.c 18 Aug 2002 18:57:04 -0000 *************** *** 853,861 **** if (((Const *) other)->constisnull) return 0.0; constval = ((Const *) other)->constvalue; ! /* the right-hand const is type text for all supported operators */ ! Assert(((Const *) other)->consttype == TEXTOID); ! patt = DatumGetCString(DirectFunctionCall1(textout, constval)); /* divide pattern into fixed prefix and remainder */ pstatus = pattern_fixed_prefix(patt, ptype, &prefix, &rest); --- 853,865 ---- if (((Const *) other)->constisnull) return 0.0; constval = ((Const *) other)->constvalue; ! /* the right-hand const is type text or bytea for all supported operators */ ! Assert(((Const *) other)->consttype == TEXTOID || ! ((Const *) other)->consttype == BYTEAOID); ! if (((Const *) other)->consttype == TEXTOID) ! patt = DatumGetCString(DirectFunctionCall1(textout, constval)); ! else ! patt = DatumGetCString(DirectFunctionCall1(byteaout, constval)); /* divide pattern into fixed prefix and remainder */ pstatus = pattern_fixed_prefix(patt, ptype, &prefix, &rest);