@@ -1333,7 +1333,7 @@ DdlNode* CommentOnNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
13331333 fb_assert(subName.hasData());
13341334
13351335 auto nameCopy = name;
1336- dsqlScratch->qualifyExistingName (nameCopy, obj_udf);
1336+ dsqlScratch->resolveRoutineOrRelation (nameCopy, { obj_udf} );
13371337
13381338 static const CachedRequestId funcCachedHandleId;
13391339 AutoCacheRequest requestHandle(tdbb, funcCachedHandleId);
@@ -1354,7 +1354,7 @@ DdlNode* CommentOnNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
13541354 END_FOR
13551355
13561356 nameCopy = name;
1357- dsqlScratch->qualifyExistingName (nameCopy, obj_procedure);
1357+ dsqlScratch->resolveRoutineOrRelation (nameCopy, { obj_procedure} );
13581358
13591359 static const CachedRequestId procCachedHandleId;
13601360 requestHandle.reset(tdbb, procCachedHandleId);
@@ -1389,8 +1389,6 @@ DdlNode* CommentOnNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
13891389 name = nameCopy;
13901390 }
13911391
1392- dsqlScratch->ddlSchema = name.schema;
1393-
13941392 switch (objType)
13951393 {
13961394 case obj_database:
@@ -1400,11 +1398,18 @@ DdlNode* CommentOnNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
14001398 fb_assert(name.schema.isEmpty());
14011399 break;
14021400
1401+ case obj_procedure:
1402+ case obj_udf:
1403+ dsqlScratch->resolveRoutineOrRelation(name, {objType});
1404+ break;
1405+
14031406 default:
14041407 dsqlScratch->qualifyExistingName(name, objType);
14051408 break;
14061409 }
14071410
1411+ dsqlScratch->ddlSchema = name.schema;
1412+
14081413 return DdlNode::dsqlPass(dsqlScratch);
14091414}
14101415
@@ -1503,8 +1508,7 @@ void CommentOnNode::checkPermission(thread_db* tdbb, jrd_tra* transaction)
15031508// gives the list of objects that accept descriptions. At FB2 time, the only
15041509// subobjects with descriptions are relation's fields and procedure's parameters.
15051510// In FB3 we added function's arguments.
1506- void CommentOnNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch,
1507- jrd_tra* transaction)
1511+ void CommentOnNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction)
15081512{
15091513 Attachment* const attachment = transaction->tra_attachment;
15101514
0 commit comments