RENAME USER

Function

Change the user name in the database.

Precautions

  • RENAME USER changes the user name. Only the user name of the current table can be changed.
  • If multiple users are modified and one of the user names does not exist or fails to be executed due to other reasons, the entire statement fails and all user names remain unchanged.
  • It is equivalent to ALTER USER… RENAME TO….

Syntax

RENAME USER 
    old_user1 TO new_user1,
    old_user2 TO new_user2,
    ...

Parameter Description

  • old_user Old user name, which must exist.
  • new_user New user name

Examples

rename user 
    user1 to user4, 
    user2 to user5,
    user3 to user6;

ALTER USER

Feedback
编组 3备份
    openGauss 2024-10-16 00:54:45
    cancel