Full Synchronization Error: function *** does not exist
Scenarios
During full synchronization, an error is reported, and the log information is as follows: service DATAMOVE failed, cause by: apply event=[type=table_structure, index=%s, schema_name=%s, object_name=%s] occur error, msg=ERROR: function *** does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Possible Causes
You can log in to the corresponding database in the destination RDS for PostgreSQL and run the following SQL statement to check whether there is the function. In the command, f_name indicates the function name.
select n.nspname,p.proname,pg_get_functiondef(p.oid) as funcdef from pg_proc p left join pg_namespace n on p.pronamespace=n.oid where proname ='f_name';
Solution
The missing function may belong to a plugin or is a user-defined function. Perform the following steps to check the source of the function in the source database, create the corresponding plugin or function in the destination database, and retry the DRS task.
- Log in to the source database and run the following SQL statement to query the plugin to which the function belongs (f_name indicates the function name):
select extname, nspname, proname,pg_get_function_arguments(c.oid) as funcargs from pg_extension e join pg_depend d on (d.refobjid=e.oid) join pg_proc c on (d.objid=c.oid) join pg_namespace n on c.pronamespace=n.oid where proname ='f_name';
- If the function belongs to a plugin, click Plugins on the destination RDS for PostgreSQL management page and install the plugin.
- If the function is user-defined function, create the same function in the destination database as that in the source database. For details about the function definition statement, see the execution result of the following SQL statement in the source database. f_name indicates the function name.
select n.nspname,p.proname,pg_get_functiondef(p.oid) as funcdef from pg_proc p left join pg_namespace n on p.pronamespace=n.oid where proname ='f_name';
- Retry the DRS task.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot