Product Documentation

c-treeACE V11.0 Release Notes

Previous Topic

Next Topic

SUSER_NAME and USER_NAME Scalar Functions Improved

The SUSER_NAME scalar function could cause server instability and the USER_NAME scalar function incorrectly returned the same result as the USER function. These functions have been rewritten to fix these problems. They now both correctly return the name of the user who is currently logged in.

Notice that the USER scalar function returns the name of the user under which it is currently running, which may be different from the login user during stored procedure execution. The name will be either the login user or (if the function is called within a stored procedure) the owner of the stored procedure.

The following scalar functions were also reviewed:

  • UID: This function is not supported and always returns ‑20133.
  • USER_ID: This function is not supported and always returns ‑20133.
  • USER_NAME: This function returns the name of the user who logged in to the SQL server. When called passing a user ID, as supported by the syntax, it returns ‑20133.
  • SUSER_NAME: Identical to USER_NAME.

TOCIndex