All Forums Database
eliot 12 posts Joined 05/10
21 Jul 2011
How does Teradata manages UDF

Hi,

I'm working on creating my UDF for Teradata. Before deploying my UDF, I would like to check whether a UDF with the same name exists or not in Teradata. In which table/view does Teradata keep UDF descriptions?

It seems Teradata store UDF list for each database. Is there a way to create a UDF that shared among all databases?

Regards,
Eliot

Tags:
Jim Chapman 449 posts Joined 09/04
21 Jul 2011

SELECT FunctionName FROM DBC.Functions ...

If you create the function in the SYSLIB database, it can be referenced by the simple (unqualified) function name from any database.

eliot 12 posts Joined 05/10
25 Jul 2011

Hi Jim,

Thanks for the reply.

Follow your comments I dig more into the "Database Administration" and found a view named "DBC.UDFInfo". According to the query explain, when accessing view "DBC.Functions", view "UDFInfo" will be locked and accessed. I'm wondering whether I can query "UDFInfo" directly, instead of query "Functions"?

In other words, if Teradata keep UDF in view "Functions" and only refresh "UDFInfo" when statistics are generated/updated, maybe I should always go to "Functions" for the lookup.

Regards,
Eliot

You must sign in to leave a comment.