88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.55 2001/03/22 06:16:10 momjian Exp $
11+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.56 2001/08/09 18:28:17 petere Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -343,7 +343,7 @@ checkretval(Oid rettype, List *queryTreeList)
343343{
344344if (rettype != InvalidOid )
345345elog (ERROR ,"function declared to return %s, but no SELECT provided" ,
346- typeidTypeName (rettype ));
346+ format_type_be (rettype ));
347347return ;
348348}
349349
@@ -360,14 +360,14 @@ checkretval(Oid rettype, List *queryTreeList)
360360if (rettype == InvalidOid )
361361{
362362if (cmd == CMD_SELECT )
363- elog (ERROR ,"function declared with no return type, but finalquery is a SELECT" );
363+ elog (ERROR ,"function declared with no return type, but finalstatement is a SELECT" );
364364return ;
365365}
366366
367367/* by here, the function is declared to return some type */
368368if (cmd != CMD_SELECT )
369- elog (ERROR ,"function declared to return %s, but finalquery is not a SELECT" ,
370- typeidTypeName (rettype ));
369+ elog (ERROR ,"function declared to return %s, but finalstatement is not a SELECT" ,
370+ format_type_be (rettype ));
371371
372372/*
373373 * Count the non-junk entries in the result targetlist.
@@ -383,12 +383,12 @@ checkretval(Oid rettype, List *queryTreeList)
383383{
384384if (tlistlen != 1 )
385385elog (ERROR ,"function declared to return %s returns multiple columns in final SELECT" ,
386- typeidTypeName (rettype ));
386+ format_type_be (rettype ));
387387
388388resnode = (Resdom * ) ((TargetEntry * )lfirst (tlist ))-> resdom ;
389389if (resnode -> restype != rettype )
390390elog (ERROR ,"return type mismatch in function: declared to return %s, returns %s" ,
391- typeidTypeName (rettype ),typeidTypeName (resnode -> restype ));
391+ format_type_be (rettype ),format_type_be (resnode -> restype ));
392392
393393return ;
394394}
@@ -419,7 +419,7 @@ checkretval(Oid rettype, List *queryTreeList)
419419
420420if (tlistlen != relnatts )
421421elog (ERROR ,"function declared to return %s does not SELECT the right number of columns (%d)" ,
422- typeidTypeName (rettype ),relnatts );
422+ format_type_be (rettype ),relnatts );
423423
424424/* expect attributes 1 .. n in order */
425425i = 0 ;
@@ -433,17 +433,17 @@ checkretval(Oid rettype, List *queryTreeList)
433433tletype = exprType (tle -> expr );
434434if (tletype != reln -> rd_att -> attrs [i ]-> atttypid )
435435elog (ERROR ,"function declared to return %s returns %s instead of %s at column %d" ,
436- typeidTypeName (rettype ),
437- typeidTypeName (tletype ),
438- typeidTypeName (reln -> rd_att -> attrs [i ]-> atttypid ),
436+ format_type_be (rettype ),
437+ format_type_be (tletype ),
438+ format_type_be (reln -> rd_att -> attrs [i ]-> atttypid ),
439439i + 1 );
440440i ++ ;
441441}
442442
443443/* this shouldn't happen, but let's just check... */
444444if (i != relnatts )
445445elog (ERROR ,"function declared to return %s does not SELECT the right number of columns (%d)" ,
446- typeidTypeName (rettype ),relnatts );
446+ format_type_be (rettype ),relnatts );
447447
448448heap_close (reln ,AccessShareLock );
449449}