Rules for INSERT and UPDATE Row-Level Security Policy Functions - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™
The following set of rules is specific to INSERT and UPDATE row-level security policy functions.
  • For an INSERT or UPDATE row-level security constraint UDF, the result must be a value to be placed in the target row.
  • The RETURN parameters for a hierarchical (SMALLINT) INSERT or UPDATE constraint with a parameter style of SQL are as follows.
    This return output … With this return indicator variable value … Indicates that the call …
    NULL -1 passed the policy and the constraint for the new row is null.
    any non-0 -1 passed the policy and the constraint for the new row is null.
    any non-0 0 passed the policy.

    The return value is a valid constraint value, is not null, and is the value for the new row.

    Vantage verifies the returned constraint value meets the constraint definition.

    0 0 did not pass the policy and the corresponding parameter is not null.

    Vantage ignores the target row for any further action.

  • The RETURN parameters for a non-hierarchical (BYTE[(n)] INSERT or UPDATE constraint UDF with a parameter style of SQL are as follows.
    This return output … With this return indicator variable value … Indicates that the call …
    NULL -1 passed the policy and the constraint for the new row is null.
    any non-0 -1 passed the policy and the constraint for the new row is null.
    any non-0 0 passed the policy.

    The return value is a valid constraint value, is not null, and is the value for the new row.

    Vantage verifies the returned constraint value meets the constraint definition.

    0 0 did not pass the policy and the corresponding parameter is not null.

    Vantage ignores the target row for any further action.

  • The RETURN parameters for a hierarchical (SMALLINT) INSERT or UPDATE constraint UDF with a parameter style of TD_GENERAL are as follows.
    This return output … Indicates that the call …
    any non-0 value passed the policy, the value is a valid constraint value, and is the value for the new row.

    Vantage verifies the return constraint value meets the constraint definition.

    0 did not pass the policy.

    Vantage ignores the target row for any further action.

  • The RETURN parameters for a non-hierarchical (BYTE[(n)] INSERT or UPDATE constraint UDF with a parameter style of TD_GENERAL are as follows.
    This return output … With this return indicator variable value … Indicates that the call …
    any byte is non-zero 0 passed the policy, the value is a valid constraint value, and is the value for the new row.
    all bytes are 0 0 did not pass the policy.

    Vantage ignores the target row for any further action.