diff options
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r-- | src/backend/parser/parse_expr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index a3525487485..100bf9a7b49 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.115 2002/04/16 23:08:11 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.116 2002/04/28 00:49:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1062,8 +1062,8 @@ exprIsLengthCoercion(Node *expr, int32 *coercedTypmod) } /* - * Furthermore, the name of the function must be the same as the - * argument/result type's name. + * Furthermore, the name and namespace of the function must be the same + * as its result type's name/namespace (cf. find_coercion_function). */ typeTuple = SearchSysCache(TYPEOID, ObjectIdGetDatum(procStruct->prorettype), @@ -1072,9 +1072,9 @@ exprIsLengthCoercion(Node *expr, int32 *coercedTypmod) elog(ERROR, "cache lookup for type %u failed", procStruct->prorettype); typeStruct = (Form_pg_type) GETSTRUCT(typeTuple); - if (strncmp(NameStr(procStruct->proname), - NameStr(typeStruct->typname), - NAMEDATALEN) != 0) + if (strcmp(NameStr(procStruct->proname), + NameStr(typeStruct->typname)) != 0 || + procStruct->pronamespace != typeStruct->typnamespace) { ReleaseSysCache(procTuple); ReleaseSysCache(typeTuple); |