@@ -450,14 +450,14 @@ DefineType(List *names, List *parameters)
450450 {
451451 /* backwards-compatibility hack */
452452 ereport (WARNING ,
453- (errmsg ("changing return type of function %s from \"opaque \" to %s " ,
454- NameListToString (inputName ), typeName )));
453+ (errmsg ("changing return type of function %s from \"%s \" to \"%s\" " ,
454+ NameListToString (inputName ), "opaque" , typeName )));
455455 SetFunctionReturnType (inputOid , typoid );
456456 }
457457 else
458458 ereport (ERROR ,
459459 (errcode (ERRCODE_INVALID_OBJECT_DEFINITION ),
460- errmsg ("type input function %s must return type %s " ,
460+ errmsg ("type input function %s must return type \"%s\" " ,
461461 NameListToString (inputName ), typeName )));
462462 }
463463 resulttype = get_func_rettype (outputOid );
@@ -467,23 +467,23 @@ DefineType(List *names, List *parameters)
467467 {
468468 /* backwards-compatibility hack */
469469 ereport (WARNING ,
470- (errmsg ("changing return type of function %s from \"opaque \" to \"cstring \"" ,
471- NameListToString (outputName ))));
470+ (errmsg ("changing return type of function %s from \"%s \" to \"%s \"" ,
471+ NameListToString (outputName ), "opaque" , "cstring" )));
472472 SetFunctionReturnType (outputOid , CSTRINGOID );
473473 }
474474 else
475475 ereport (ERROR ,
476476 (errcode (ERRCODE_INVALID_OBJECT_DEFINITION ),
477- errmsg ("type output function %s must return type \"cstring \"" ,
478- NameListToString (outputName ))));
477+ errmsg ("type output function %s must return type \"%s \"" ,
478+ NameListToString (outputName ), "cstring" )));
479479 }
480480 if (receiveOid )
481481 {
482482 resulttype = get_func_rettype (receiveOid );
483483 if (resulttype != typoid )
484484 ereport (ERROR ,
485485 (errcode (ERRCODE_INVALID_OBJECT_DEFINITION ),
486- errmsg ("type receive function %s must return type %s " ,
486+ errmsg ("type receive function %s must return type \"%s\" " ,
487487 NameListToString (receiveName ), typeName )));
488488 }
489489 if (sendOid )
@@ -492,8 +492,8 @@ DefineType(List *names, List *parameters)
492492 if (resulttype != BYTEAOID )
493493 ereport (ERROR ,
494494 (errcode (ERRCODE_INVALID_OBJECT_DEFINITION ),
495- errmsg ("type send function %s must return type \"bytea \"" ,
496- NameListToString (sendName ))));
495+ errmsg ("type send function %s must return type \"%s \"" ,
496+ NameListToString (sendName ), "bytea" )));
497497 }
498498
499499 /*
@@ -1834,8 +1834,8 @@ findTypeTypmodinFunction(List *procname)
18341834 if (get_func_rettype (procOid ) != INT4OID )
18351835 ereport (ERROR ,
18361836 (errcode (ERRCODE_INVALID_OBJECT_DEFINITION ),
1837- errmsg ("typmod_in function %s must return type \"integer \"" ,
1838- NameListToString (procname ))));
1837+ errmsg ("typmod_in function %s must return type \"%s \"" ,
1838+ NameListToString (procname ), "integer" )));
18391839
18401840 return procOid ;
18411841}
@@ -1861,8 +1861,8 @@ findTypeTypmodoutFunction(List *procname)
18611861 if (get_func_rettype (procOid ) != CSTRINGOID )
18621862 ereport (ERROR ,
18631863 (errcode (ERRCODE_INVALID_OBJECT_DEFINITION ),
1864- errmsg ("typmod_out function %s must return type \"cstring \"" ,
1865- NameListToString (procname ))));
1864+ errmsg ("typmod_out function %s must return type \"%s \"" ,
1865+ NameListToString (procname ), "cstring" )));
18661866
18671867 return procOid ;
18681868}
@@ -1888,8 +1888,8 @@ findTypeAnalyzeFunction(List *procname, Oid typeOid)
18881888 if (get_func_rettype (procOid ) != BOOLOID )
18891889 ereport (ERROR ,
18901890 (errcode (ERRCODE_INVALID_OBJECT_DEFINITION ),
1891- errmsg ("type analyze function %s must return type \"boolean \"" ,
1892- NameListToString (procname ))));
1891+ errmsg ("type analyze function %s must return type \"%s \"" ,
1892+ NameListToString (procname ), "boolean" )));
18931893
18941894 return procOid ;
18951895}
@@ -2007,8 +2007,9 @@ findRangeSubtypeDiffFunction(List *procname, Oid subtype)
20072007 if (get_func_rettype (procOid ) != FLOAT8OID )
20082008 ereport (ERROR ,
20092009 (errcode (ERRCODE_INVALID_OBJECT_DEFINITION ),
2010- errmsg ("range subtype diff function %s must return type double precision" ,
2011- func_signature_string (procname , 2 , NIL , argList ))));
2010+ errmsg ("range subtype diff function %s must return type \"%s\"" ,
2011+ func_signature_string (procname , 2 , NIL , argList ),
2012+ "double precision" )));
20122013
20132014 if (func_volatile (procOid ) != PROVOLATILE_IMMUTABLE )
20142015 ereport (ERROR ,
0 commit comments