Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 44cf948

Browse files
author
Thomas G. Lockhart
committed
Fix up error messages when looking up functions and operators to not
make the sometimes misleading claim that more than one candidate was identified. Now say "Unable to identify...".
1 parent 1a8790f commit 44cf948

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/backend/parser/parse_func.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.33 1998/12/13 04:16:51 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.34 1998/12/13 23:54:40 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -399,7 +399,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
399399
}
400400
else
401401
{
402-
elog(ERROR,"Unable to select an aggregate function for type %s",
402+
elog(ERROR,"Unable to select an aggregate function for type '%s'",
403403
typeidTypeName(basetype));
404404
}
405405
}
@@ -986,7 +986,7 @@ func_get_detail(char *funcname,
986986
if (*true_typeids == NULL)
987987
{
988988
func_error(NULL, funcname, nargs, oid_array,
989-
"There is more than one function that satisfies the given argument types"
989+
"Unable to identify a function which satisfies the given argument types"
990990
"\n\tYou will have to retype your query using explicit typecasts");
991991
}
992992

src/backend/parser/parse_oper.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.22 1998/12/08 06:18:57 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.23 1998/12/13 23:54:40 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -48,8 +48,8 @@ any_ordering_op(int restype)
4848
order_op = oper("<", restype, restype, TRUE);
4949
if (!HeapTupleIsValid(order_op))
5050
{
51-
elog(ERROR, "Unable to find an ordering operator '%s' for type %s."
52-
"\n\tUse an explicit ordering operator or modify the query.",
51+
elog(ERROR, "Unable to identify an ordering operator '%s' for type '%s'"
52+
"\n\tUse an explicit ordering operator or modify the query",
5353
"<", typeidTypeName(restype));
5454
}
5555
order_opid = oprid(order_op);
@@ -513,7 +513,7 @@ oper_inexact(char *op, Oid arg1, Oid arg2, Node **ltree, Node **rtree, bool noWa
513513
{
514514
if (!noWarnings)
515515
{
516-
elog(ERROR, "There is more than one possible operator '%s' for types '%s' and '%s'"
516+
elog(ERROR, "Unable to identify an operator '%s' for types '%s' and '%s'"
517517
"\n\tYou will have to retype this query using an explicit cast",
518518
op, typeTypeName(typeidType(arg1)), typeTypeName(typeidType(arg2)));
519519
}
@@ -544,7 +544,7 @@ oper(char *opname, Oid ltypeId, Oid rtypeId, bool noWarnings)
544544
}
545545
else if (!noWarnings)
546546
{
547-
elog(ERROR, "Unable to find binary operator '%s' for types %s and %s",
547+
elog(ERROR, "Unable to identify a binary operator '%s' for types %s and %s",
548548
opname, typeTypeName(typeidType(ltypeId)), typeTypeName(typeidType(rtypeId)));
549549
}
550550

@@ -662,7 +662,7 @@ right_oper(char *op, Oid arg)
662662

663663
if (!HeapTupleIsValid(tup))
664664
{
665-
elog(ERROR, "Unable to convert right operator '%s' from type %s",
665+
elog(ERROR, "Unable to convert right operator '%s' from type '%s'",
666666
op, typeidTypeName(arg));
667667
return NULL;
668668
}
@@ -723,7 +723,7 @@ left_oper(char *op, Oid arg)
723723

724724
if (!HeapTupleIsValid(tup))
725725
{
726-
elog(ERROR, "Unable to convert left operator '%s' from type %s",
726+
elog(ERROR, "Unable to convert left operator '%s' from type '%s'",
727727
op, typeidTypeName(arg));
728728
return NULL;
729729
}

0 commit comments

Comments
 (0)