aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/analyze.c6
-rw-r--r--src/backend/parser/catalog_utils.c18
-rw-r--r--src/backend/parser/parse_query.c6
3 files changed, 16 insertions, 14 deletions
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index 463cc06c822..21667455a85 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.20 1997/01/22 01:42:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.21 1997/02/07 16:22:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1486,7 +1486,7 @@ any_ordering_op(int restype)
Operator order_op;
Oid order_opid;
- order_op = oper("<",restype,restype);
+ order_op = oper("<",restype,restype,false);
order_opid = oprid(order_op);
return order_opid;
@@ -1554,7 +1554,7 @@ transformSortClause(ParseState *pstate,
sortcl->resdom = resdom = restarget->resdom;
sortcl->opoid = oprid(oper(sortby->useOp,
resdom->restype,
- resdom->restype));
+ resdom->restype,false));
if (sortlist == NIL) {
s = sortlist = lcons(sortcl, NIL);
}else {
diff --git a/src/backend/parser/catalog_utils.c b/src/backend/parser/catalog_utils.c
index e444742ef3e..661cea098bb 100644
--- a/src/backend/parser/catalog_utils.c
+++ b/src/backend/parser/catalog_utils.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.15 1997/01/22 01:43:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.16 1997/02/07 16:23:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -473,7 +473,7 @@ binary_oper_select_candidate(Oid arg1,
/* Given operator, types of arg1, and arg2, return oper struct */
/* arg1, arg2 --typeids */
Operator
-oper(char *op, Oid arg1, Oid arg2)
+oper(char *op, Oid arg1, Oid arg2, bool noWarnings)
{
HeapTuple tup;
CandidateList candidates;
@@ -492,7 +492,8 @@ oper(char *op, Oid arg1, Oid arg2)
/*
* no operators of the desired types found
*/
- op_error(op, arg1, arg2);
+ if (!noWarnings)
+ op_error(op, arg1, arg2);
return(NULL);
} else if (ncandidates == 1) {
/*
@@ -523,11 +524,12 @@ oper(char *op, Oid arg1, Oid arg2)
/* we chose none of them */
tp1 = get_id_type(arg1);
tp2 = get_id_type(arg2);
- elog(NOTICE, "there is more than one operator %s for types", op);
- elog(NOTICE, "%s and %s. You will have to retype this query",
- tname(tp1), tname(tp2));
- elog(WARN, "using an explicit cast");
-
+ if (!noWarnings) {
+ elog(NOTICE, "there is more than one operator %s for types", op);
+ elog(NOTICE, "%s and %s. You will have to retype this query",
+ tname(tp1), tname(tp2));
+ elog(WARN, "using an explicit cast");
+ }
return(NULL);
}
}
diff --git a/src/backend/parser/parse_query.c b/src/backend/parser/parse_query.c
index 372f758a140..a6dd24d00e8 100644
--- a/src/backend/parser/parse_query.c
+++ b/src/backend/parser/parse_query.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/Attic/parse_query.c,v 1.12 1997/01/22 01:43:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/parse_query.c,v 1.13 1997/02/07 16:23:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -352,7 +352,7 @@ make_op(char *opname, Node *ltree, Node *rtree)
/* right operator */
ltypeId = (ltree==NULL) ? UNKNOWNOID : exprType(ltree);
- temp = right_oper(opname, ltypeId);
+ temp = oper(opname, ltypeId, rtypeId, false);
opform = (OperatorTupleForm) GETSTRUCT(temp);
left = make_operand(opname, ltree, ltypeId, opform->oprleft);
right = NULL;
@@ -411,7 +411,7 @@ make_op(char *opname, Node *ltree, Node *rtree)
((Const *)ltree)->constbyval = tbyval(newtype);
}
- temp = oper(opname, ltypeId, rtypeId);
+ temp = oper(opname, ltypeId, rtypeId, false);
opform = (OperatorTupleForm) GETSTRUCT(temp);
left = make_operand(opname, ltree, ltypeId, opform->oprleft);
right = make_operand(opname, rtree, rtypeId, opform->oprright);