How does Teradata manages UDF

Database
Enthusiast

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 (1)
2 REPLIES
Enthusiast

Re: How does Teradata manages UDF

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.

Enthusiast

Re: How does Teradata manages UDF

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