SHOW USERS 命令:NULL 值替换输出中的默认值

Attention

This behavior change is in the 2024_08 bundle.

For the current status of the bundle, refer to Bundle History.

When this behavior change bundle is enabled, the output of the SHOW USERS command changes as follows:

Before the change:

某些输出列显示默认值(例如空字符串或 false),而非实际 NULL 值。在当前用户无权访问列值时,以及未定义相关用户的属性时,都会发生此行为。

For example, create a user named nulltest:

CREATE OR REPLACE USER nulltest DISPLAY_NAME = 'iamnull';

The SHOW USERS command for this new user returns an empty string for undefined properties such as first_name, last_name, and email.

After the change:

NULL is used to represent expected NULL values, instead of an empty string, false, and so on. For example, create a user named nulltest:

CREATE OR REPLACE USER nulltest DISPLAY_NAME = 'iamnull';

The SHOW USERS command for this new user returns NULL values for undefined properties such as first_name, last_name, and email.

此变更会影响以下 SHOW USERS 输出列:

  • name
  • comment
  • display_name
  • email
  • first_name
  • last_name
  • has_password
  • has_rsa_public_key
  • has_mfa
  • namespace
  • warehouse
  • default_role
  • login_name
  • disabled
  • snowflake_lock
  • must_change_password
  • mins_to_unlock
  • days_to_expiry
  • mins_to_bypass_mfa
  • default_secondary_roles

参考:1798