8
8
*
9
9
*
10
10
* 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 $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -343,7 +343,7 @@ checkretval(Oid rettype, List *queryTreeList)
343
343
{
344
344
if (rettype != InvalidOid )
345
345
elog (ERROR ,"function declared to return %s, but no SELECT provided" ,
346
- typeidTypeName (rettype ));
346
+ format_type_be (rettype ));
347
347
return ;
348
348
}
349
349
@@ -360,14 +360,14 @@ checkretval(Oid rettype, List *queryTreeList)
360
360
if (rettype == InvalidOid )
361
361
{
362
362
if (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" );
364
364
return ;
365
365
}
366
366
367
367
/* by here, the function is declared to return some type */
368
368
if (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 ));
371
371
372
372
/*
373
373
* Count the non-junk entries in the result targetlist.
@@ -383,12 +383,12 @@ checkretval(Oid rettype, List *queryTreeList)
383
383
{
384
384
if (tlistlen != 1 )
385
385
elog (ERROR ,"function declared to return %s returns multiple columns in final SELECT" ,
386
- typeidTypeName (rettype ));
386
+ format_type_be (rettype ));
387
387
388
388
resnode = (Resdom * ) ((TargetEntry * )lfirst (tlist ))-> resdom ;
389
389
if (resnode -> restype != rettype )
390
390
elog (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 ));
392
392
393
393
return ;
394
394
}
@@ -419,7 +419,7 @@ checkretval(Oid rettype, List *queryTreeList)
419
419
420
420
if (tlistlen != relnatts )
421
421
elog (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 );
423
423
424
424
/* expect attributes 1 .. n in order */
425
425
i = 0 ;
@@ -433,17 +433,17 @@ checkretval(Oid rettype, List *queryTreeList)
433
433
tletype = exprType (tle -> expr );
434
434
if (tletype != reln -> rd_att -> attrs [i ]-> atttypid )
435
435
elog (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 ),
439
439
i + 1 );
440
440
i ++ ;
441
441
}
442
442
443
443
/* this shouldn't happen, but let's just check... */
444
444
if (i != relnatts )
445
445
elog (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 );
447
447
448
448
heap_close (reln ,AccessShareLock );
449
449
}