Commit 990eb855 authored by Tom Lane's avatar Tom Lane

Don't accept names of complex types (ie, relation types) as being

requests for implicit trivial coercions.  Prevents sillinesses like
this one:
regression=# select x.int8_tbl.q1 from int8_tbl x;
ERROR:  fmgr_info: function 270997776: cache lookup failed
parent 3dd85bcb
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.114 2001/11/12 00:00:55 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.115 2001/12/12 03:28:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -1165,7 +1165,8 @@ func_get_detail(char *funcname,
targetType = GetSysCacheOid(TYPENAME,
PointerGetDatum(funcname),
0, 0, 0);
if (OidIsValid(targetType))
if (OidIsValid(targetType) &&
!ISCOMPLEX(targetType))
{
Oid sourceType = argtypes[0];
Node *arg1 = lfirst(fargs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment