17.10 - Creating Row Level Security UDFs - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Advanced SQL Engine Security Administration

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Administration
Security
Publication ID
B035-1100-171K
Language
English (United States)

Coding a set of UDFs for a security constraint must be coordinated with the purpose and structure of the corresponding CONSTRAINT object. See Working with Security Constraints.

  1. Code and file each security constraint UDF as shown in Teradata Vantage™ - SQL External Routine Programming, B035-1147.
    You can create more than one UDF for an SQL operation type, but you can only specify one UDF of each type in a security CONSTRAINT object.
  2. Use the CREATE FUNCTION statement to define a FUNCTION object for each UDF, as documented in Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.
  3. To avoid performance problems that occur when running the UDF in protected mode, use the ALTER FUNCTION statement to set non-protected mode execution for the function:
    ALTER FUNCTION SYSLIB.function_name EXECUTE NOT PROTECTED
If a UDF fails to operate correctly in non-protected mode, it can cause a database restart. Be sure to test each UDF thoroughly before deploying it.