Synonyms for UDXs

UDFs, UDAs, and user-defined shared libraries are in specific databases or schema. Like tables, views, and other objects, UDXs also support cross-database access, so you can use fully qualified names and synonyms to access UDXs that are in a database other than the one that you are currently logged in to for your queries.

You can also create a synonym in the current database to reference a UDX that resides in a different database on the same Performance Server system. To create a synonym in the current database for a UDX that is in a different database on the same Netezza Performance Server system, follow the same steps as for a Netezza Performance Server table, view, or object. For example:
CREATE SYNONYM <name> FOR <object name>

The <object name> can be a local UDX or a fully qualified name for a UDX in a different database. Query users can then invoke the UDX by using its synonym <name>.

You can use UDFs and UDAs in a view like you can use built-in functions. If you use them in a view, privilege-checking is based on the view privileges, and the Execute object privileges are bypassed. For more information about how to use functions in views, see the IBM® Netezza® Database User’s Guide.