|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.126 2002/04/11 20:00:01 tgl Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.127 2002/05/03 20:15:02 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -686,6 +686,11 @@ func_select_candidate(int nargs,
|
686 | 686 | * b) if the answer is one, we have our function
|
687 | 687 | * c) if the answer is more than one, attempt to resolve the conflict
|
688 | 688 | * d) if the answer is zero, try the next array from vector #1
|
| 689 | + * |
| 690 | + * Note: we rely primarily on nargs/argtypes as the argument description. |
| 691 | + * The actual expression node list is passed in fargs so that we can check |
| 692 | + * for type coercion of a constant. Some callers pass fargs == NIL |
| 693 | + * indicating they don't want that check made. |
689 | 694 | */
|
690 | 695 | FuncDetailCode
|
691 | 696 | func_get_detail(List*funcname,
|
@@ -740,7 +745,7 @@ func_get_detail(List *funcname,
|
740 | 745 | * that result for something coerce_type can't handle, we'll cause
|
741 | 746 | * infinite recursion between this module and coerce_type!
|
742 | 747 | */
|
743 |
| -if (nargs==1) |
| 748 | +if (nargs==1&&fargs!=NIL) |
744 | 749 | {
|
745 | 750 | OidtargetType;
|
746 | 751 | TypeName*tn=makeNode(TypeName);
|
|