Skip to content

Commit 990eb85

Browse files
committed
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
1 parent 3dd85bc commit 990eb85

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/parser/parse_func.c

Lines changed: 3 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.114 2001/11/12 00:00:55 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.115 2001/12/12 03:28:49 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1165,7 +1165,8 @@ func_get_detail(char *funcname,
11651165
targetType = GetSysCacheOid(TYPENAME,
11661166
PointerGetDatum(funcname),
11671167
0, 0, 0);
1168-
if (OidIsValid(targetType))
1168+
if (OidIsValid(targetType) &&
1169+
!ISCOMPLEX(targetType))
11691170
{
11701171
Oid sourceType = argtypes[0];
11711172
Node *arg1 = lfirst(fargs);

0 commit comments

Comments
 (0)