Home Explore Blog CI



postgresql

4th chunk of `doc/src/sgml/ref/alter_role.sgml`
25905bb306b01d06f4a4b0f31f1397336242b2422f29cdd700000001000009b5
     <term><replaceable>database_name</replaceable></term>
       <listitem>
         <para>
           The name of the database the configuration variable should be set in.
         </para>
       </listitem>
     </varlistentry>

     <varlistentry id="sql-alterrole-params-configuration-parameter">
      <term><replaceable>configuration_parameter</replaceable></term>
      <term><replaceable>value</replaceable></term>
      <listitem>
       <para>
        Set this role's session default for the specified configuration
        parameter to the given value.  If
        <replaceable>value</replaceable> is <literal>DEFAULT</literal>
        or, equivalently, <literal>RESET</literal> is used, the
        role-specific variable setting is removed, so the role will
        inherit the system-wide default setting in new sessions.  Use
        <literal>RESET ALL</literal> to clear all role-specific settings.
        <literal>SET FROM CURRENT</literal> saves the session's current value of
        the parameter as the role-specific value.
        If <literal>IN DATABASE</literal> is specified, the configuration
        parameter is set or removed for the given role and database only.
       </para>

       <para>
        Role-specific variable settings take effect only at login;
        <link linkend="sql-set-role"><command>SET ROLE</command></link> and
        <link linkend="sql-set-session-authorization"><command>SET SESSION AUTHORIZATION</command></link>
        do not process role-specific variable settings.
       </para>

       <para>
        See <xref linkend="sql-set"/> and <xref
        linkend="runtime-config"/> for more information about allowed
        parameter names and values.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
 </refsect1>

 <refsect1 id="sql-alterrole-notes">
  <title>Notes</title>

  <para>
   Use <link linkend="sql-createrole"><command>CREATE ROLE</command></link>
   to add new roles, and <link linkend="sql-droprole"><command>DROP ROLE</command></link> to remove a role.
  </para>

  <para>
   <command>ALTER ROLE</command> cannot change a role's memberships.
   Use <link linkend="sql-grant"><command>GRANT</command></link> and
   <link linkend="sql-revoke"><command>REVOKE</command></link>
   to do that.
  </para>

  <para>
   Caution must be exercised when specifying an unencrypted password
   with this command.  The password will be transmitted to the server
   in cleartext, and it might also

Title: ALTER ROLE Parameters Continued: Database Configuration, Session Defaults, and Notes
Summary
Continuing the description of ALTER ROLE parameters, this section details setting role-specific session defaults for configuration parameters, including resetting to system-wide defaults, setting from the current session, and setting parameters for specific databases. It notes that role-specific settings take effect only at login. It also provides notes on alternative commands for creating, dropping, and managing role memberships, and a caution about specifying unencrypted passwords.