aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_func.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-05-03 20:15:02 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-05-03 20:15:02 +0000
commit90739d4621c654719dd8d214f9a8c160d407ac4c (patch)
tree94a72a94f610bd81a0f88dbc8cfbf7b65949497e /src/backend/parser/parse_func.c
parent1a69a37d5b44ebc97c053ee660bbd610cebbfd93 (diff)
downloadpostgresql-90739d4621c654719dd8d214f9a8c160d407ac4c.tar.gz
postgresql-90739d4621c654719dd8d214f9a8c160d407ac4c.zip
Make ruleutils.c schema-aware. Displayed names are schema-qualified
only if they would not be found without qualification given the current search path, as per idea from Peter Eisentraut.
Diffstat (limited to 'src/backend/parser/parse_func.c')
-rw-r--r--src/backend/parser/parse_func.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c
index 2ab9c9a6898..f74f5be2f7b 100644
--- a/src/backend/parser/parse_func.c
+++ b/src/backend/parser/parse_func.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.126 2002/04/11 20:00:01 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.127 2002/05/03 20:15:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -686,6 +686,11 @@ func_select_candidate(int nargs,
* b) if the answer is one, we have our function
* c) if the answer is more than one, attempt to resolve the conflict
* d) if the answer is zero, try the next array from vector #1
+ *
+ * Note: we rely primarily on nargs/argtypes as the argument description.
+ * The actual expression node list is passed in fargs so that we can check
+ * for type coercion of a constant. Some callers pass fargs == NIL
+ * indicating they don't want that check made.
*/
FuncDetailCode
func_get_detail(List *funcname,
@@ -740,7 +745,7 @@ func_get_detail(List *funcname,
* that result for something coerce_type can't handle, we'll cause
* infinite recursion between this module and coerce_type!
*/
- if (nargs == 1)
+ if (nargs == 1 && fargs != NIL)
{
Oid targetType;
TypeName *tn = makeNode(TypeName);