From 337b22cb473f1c5cca011a511c488d20e153eec4 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 20 Mar 2002 19:45:13 +0000 Subject: Code review for DOMAIN patch. --- src/backend/parser/parse_oper.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/backend/parser/parse_oper.c') diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c index 318f1b9eb7e..8495f9f9e65 100644 --- a/src/backend/parser/parse_oper.c +++ b/src/backend/parser/parse_oper.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.52 2002/02/19 20:11:15 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.53 2002/03/20 19:44:31 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -354,9 +354,7 @@ oper_select_candidate(int nargs, { if (input_typeids[i] != UNKNOWNOID) { - if (current_typeids[i] == input_typeids[i] || - IS_BINARY_COMPATIBLE(current_typeids[i], - input_typeids[i])) + if (IsBinaryCompatible(current_typeids[i], input_typeids[i])) nmatch++; } } @@ -736,10 +734,8 @@ compatible_oper(char *op, Oid arg1, Oid arg2, bool noError) /* but is it good enough? */ opform = (Form_pg_operator) GETSTRUCT(optup); - if ((opform->oprleft == arg1 || - IS_BINARY_COMPATIBLE(opform->oprleft, arg1)) && - (opform->oprright == arg2 || - IS_BINARY_COMPATIBLE(opform->oprright, arg2))) + if (IsBinaryCompatible(opform->oprleft, arg1) && + IsBinaryCompatible(opform->oprright, arg2)) return optup; /* nope... */ -- cgit v1.2.3