@@ -404,7 +404,8 @@ ProcedureCreate(const char *procedureName,
404
404
ereport (ERROR ,
405
405
(errcode (ERRCODE_INVALID_FUNCTION_DEFINITION ),
406
406
errmsg ("cannot change return type of existing function" ),
407
- errhint ("Use DROP FUNCTION first." )));
407
+ errhint ("Use DROP FUNCTION %s first." ,
408
+ format_procedure (HeapTupleGetOid (oldtup )))));
408
409
409
410
/*
410
411
* If it returns RECORD, check for possible change of record type
@@ -427,7 +428,8 @@ ProcedureCreate(const char *procedureName,
427
428
(errcode (ERRCODE_INVALID_FUNCTION_DEFINITION ),
428
429
errmsg ("cannot change return type of existing function" ),
429
430
errdetail ("Row type defined by OUT parameters is different." ),
430
- errhint ("Use DROP FUNCTION first." )));
431
+ errhint ("Use DROP FUNCTION %s first." ,
432
+ format_procedure (HeapTupleGetOid (oldtup )))));
431
433
}
432
434
433
435
/*
@@ -469,7 +471,8 @@ ProcedureCreate(const char *procedureName,
469
471
(errcode (ERRCODE_INVALID_FUNCTION_DEFINITION ),
470
472
errmsg ("cannot change name of input parameter \"%s\"" ,
471
473
old_arg_names [j ]),
472
- errhint ("Use DROP FUNCTION first." )));
474
+ errhint ("Use DROP FUNCTION %s first." ,
475
+ format_procedure (HeapTupleGetOid (oldtup )))));
473
476
}
474
477
}
475
478
@@ -492,7 +495,8 @@ ProcedureCreate(const char *procedureName,
492
495
ereport (ERROR ,
493
496
(errcode (ERRCODE_INVALID_FUNCTION_DEFINITION ),
494
497
errmsg ("cannot remove parameter defaults from existing function" ),
495
- errhint ("Use DROP FUNCTION first." )));
498
+ errhint ("Use DROP FUNCTION %s first." ,
499
+ format_procedure (HeapTupleGetOid (oldtup )))));
496
500
497
501
proargdefaults = SysCacheGetAttr (PROCNAMEARGSNSP , oldtup ,
498
502
Anum_pg_proc_proargdefaults ,
@@ -518,7 +522,8 @@ ProcedureCreate(const char *procedureName,
518
522
ereport (ERROR ,
519
523
(errcode (ERRCODE_INVALID_FUNCTION_DEFINITION ),
520
524
errmsg ("cannot change data type of existing parameter default value" ),
521
- errhint ("Use DROP FUNCTION first." )));
525
+ errhint ("Use DROP FUNCTION %s first." ,
526
+ format_procedure (HeapTupleGetOid (oldtup )))));
522
527
newlc = lnext (newlc );
523
528
}
524
529
}
0 commit comments