Skip to content

Commit 90739d4

Browse files
committed
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.
1 parent 1a69a37 commit 90739d4

File tree

2 files changed

+339
-166
lines changed

2 files changed

+339
-166
lines changed

src/backend/parser/parse_func.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* 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 $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -686,6 +686,11 @@ func_select_candidate(int nargs,
686686
* b) if the answer is one, we have our function
687687
* c) if the answer is more than one, attempt to resolve the conflict
688688
* 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.
689694
*/
690695
FuncDetailCode
691696
func_get_detail(List *funcname,
@@ -740,7 +745,7 @@ func_get_detail(List *funcname,
740745
* that result for something coerce_type can't handle, we'll cause
741746
* infinite recursion between this module and coerce_type!
742747
*/
743-
if (nargs == 1)
748+
if (nargs == 1 && fargs != NIL)
744749
{
745750
Oid targetType;
746751
TypeName *tn = makeNode(TypeName);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy