*** ../src/backend/parser/parse_oper.c.orig Tue Sep 1 04:30:34 1998 --- ../src/backend/parser/parse_oper.c Wed Sep 16 06:23:39 1998 *************** *** 312,318 **** if (ncandidates <= 1) { if (!can_coerce_type(1, &input_typeids[0], &candidates->args[0]) ! || !can_coerce_type(1, &input_typeids[1], &candidates->args[1])) { ncandidates = 0; #ifdef PARSEDEBUG --- 312,318 ---- if (ncandidates <= 1) { if (!can_coerce_type(1, &input_typeids[0], &candidates->args[0]) ! || ((nargs > 1) && !can_coerce_type(1, &input_typeids[1], &candidates->args[1]))) { ncandidates = 0; #ifdef PARSEDEBUG *************** *** 718,724 **** } else { ! targetOid = func_select_candidate(1, &arg, candidates); if (targetOid != NULL) { --- 718,724 ---- } else { ! targetOid = oper_select_candidate(1, &arg, candidates); if (targetOid != NULL) { *************** *** 729,740 **** CharGetDatum('r')); } else tup = NULL; if (!HeapTupleIsValid(tup)) { ! elog(ERROR, "Unable to convert right operator '%s' from type %s to %s", ! op, typeidTypeName(arg), typeidTypeName(*targetOid)); return NULL; } } --- 729,742 ---- CharGetDatum('r')); } else + { tup = NULL; + } if (!HeapTupleIsValid(tup)) { ! elog(ERROR, "Unable to convert right operator '%s' from type %s", ! op, typeidTypeName(arg)); return NULL; } } *************** *** 782,798 **** } else { ! targetOid = func_select_candidate(1, &arg, candidates); ! tup = SearchSysCacheTuple(OPRNAME, ! PointerGetDatum(op), ! ObjectIdGetDatum(InvalidOid), ! ObjectIdGetDatum(*targetOid), ! CharGetDatum('l')); if (!HeapTupleIsValid(tup)) { ! elog(ERROR, "Unable to convert left operator '%s' from type %s to %s", ! op, typeidTypeName(arg), typeidTypeName(*targetOid)); return NULL; } #ifdef PARSEDEBUG --- 784,807 ---- } else { ! targetOid = oper_select_candidate(1, &arg, candidates); ! if (targetOid != NULL) ! { ! tup = SearchSysCacheTuple(OPRNAME, ! PointerGetDatum(op), ! ObjectIdGetDatum(InvalidOid), ! ObjectIdGetDatum(*targetOid), ! CharGetDatum('l')); ! } ! else ! { ! tup = NULL; ! } if (!HeapTupleIsValid(tup)) { ! elog(ERROR, "Unable to convert left operator '%s' from type %s", ! op, typeidTypeName(arg)); return NULL; } #ifdef PARSEDEBUG