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

Security Administration

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2022-02-15
dita:mapPath
ppz1593203596223.ditamap
dita:ditavalPath
wrg1590696035526.ditaval
dita:id
B035-1100
lifecycle
previous
Product Category
Teradata Vantage™

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.