What database user are you using in your datasource? Does that user have permission to execute this function? Try connecting to the database as the same user in your datasource using some 3rd party tool and run the query.
Yes the user configured in the data source has the execute command privilege on this function and using SQL Developer I have executed the same from user configured in the data source and query is running without any problem from data source user also.
Well the error is coming from the database so if you can successfully execute it outside then either the database user or the command is not what you expect when you run it from within pega. In the RDB rule click on test connectivity to confirm that database rule that is being used for the connection and then confirm that rule specifies the database user you expect. You can also run a trace with "db cache" and db_query" options to try to figure out where the error is coming from.