15.10 - Rules for Determining Whether Profile Defaults or User Defaults Are Assigned as Session Row-Level Security Defaults - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

When you establish a session, the default value for row-level security constraints assigned to the profile for the user or those directly assigned to the user become current for the session. Those row-level security constraints that are assigned to a profile take precedence over those assigned to the user. The rules for determining the initial assignment of constraint values for a session are as follows.

  • If a user has been assigned a profile and that profile has been assigned row-level security constraint values, those profile constraints become current for the session.

    In this case, Teradata Database does not consider any constraints that are assigned directly to the user.

  • If a user has been assigned a profile and that profile has not been assigned any row-level security constraints, then Teradata Database assigns any constraints for the session from the user definition.

    If there are no row-level security constraints assigned to the user, all constraints for the session are null.

  • If a user has not been assigned a profile, then Teradata Database allocates the row-level security constraints assigned directly to the user for the session.

    If no row-level security constraints are assigned to the user, all constraints for the session are set null.

  • If a hierarchical constraint with multiple assigned values is assigned to a session, then Teradata Database only assigns the default values for the source to the session.
  • If a non-hierarchical constraint with multiple assigned values is assigned to a session, then Teradata Database applies all assigned values for the source to the session.