zoukankan      html  css  js  c++  java
  • PostgreSQL: Rename a User

    Syntax

    The syntax to rename a user using the ALTER USER statement in PostgreSQL is:

    ALTER USER user_name
      RENAME TO new_name;

    Parameters or Arguments

    user_name
    The name of the user to rename in the PostgreSQL database.
    new_name
    The new name to assign to the user.

    Note

    • You can not rename the current session user. If you wish to rename the current session user, you will need to logout and then login as a different user to run the ALTER USER statement.

    Example

    Let's look at how to rename a user in PostgreSQL using the ALTER USER statement.

    For example:

    ALTER USER techonthenet
      RENAME TO totn;

    In this example, the ALTER USER statement would rename the user called techonthenet to totn in the PostgreSQL database.

  • 相关阅读:
    0802作业1替换文本文件内容

    看病
    爬山
    作业1
    超市(未完成)
    图片复制
    替换
    文件
    英文字母和中文汉字在不同字符集编码下的字节数
  • 原文地址:https://www.cnblogs.com/telwanggs/p/11689912.html
Copyright © 2011-2022 走看看