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

Teradata Database SQL Data Definition Language Detailed Topics

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1184-015K
Language
English (United States)

Rules for INSERT and UPDATE Row‑Level Security Policy Functions

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.

    Teradata Database verifies that the returned constraint value meets the constraint definition.

          0

              0

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

    Teradata Database 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.

    Teradata Database verifies that the returned constraint value meets the constraint definition.

          0

              0

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

    Teradata Database 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.

    Teradata Database verifies that the return constraint value meets the constraint definition.

          0

    did not pass the policy.

    Teradata Database 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.

    Teradata Database ignores the target row for any further action.