head	1.18;
access;
symbols
	REL9_0_0:1.17.2.1
	REL9_1_ALPHA1:1.18
	REL9_0_RC1:1.17.2.1
	REL9_0_BETA4:1.17
	REL9_0_STABLE:1.17.0.2
	REL9_0_BETA3:1.17
	REL9_0_BETA2:1.17
	REL8_1_21:1.2
	REL8_2_17:1.7.2.1
	REL8_3_11:1.9
	REL8_4_4:1.12
	REL9_0_BETA1:1.17
	REL9_0_ALPHA5_BRANCH:1.15.0.8
	REL9_0_ALPHA5:1.15
	REL8_1_20:1.2
	REL8_2_16:1.7.2.1
	REL8_3_10:1.9
	REL8_4_3:1.12
	REL9_0_ALPHA4:1.15
	REL9_0_ALPHA4_BRANCH:1.15.0.6
	REL8_5_ALPHA3:1.15
	REL8_5_ALPHA3_BRANCH:1.15.0.4
	REL8_1_19:1.2
	REL8_2_15:1.7.2.1
	REL8_3_9:1.9
	REL8_4_2:1.12
	REL8_5_ALPHA2:1.15
	REL8_5_ALPHA2_BRANCH:1.15.0.2
	REL8_1_18:1.2
	REL8_2_14:1.7.2.1
	REL8_3_8:1.9
	REL8_4_1:1.12
	REL8_5_ALPHA1:1.12
	REL8_5_ALPHA1_BRANCH:1.12.0.4
	REL8_4_STABLE:1.12.0.2
	REL8_4_0:1.12
	REL8_4_RC2:1.12
	REL8_4_RC1:1.12
	REL8_4_BETA2:1.12
	REL8_4_BETA1:1.12
	REL8_1_17:1.2
	REL8_2_13:1.7.2.1
	REL8_3_7:1.9
	REL8_1_16:1.2
	REL8_2_12:1.7.2.1
	REL8_3_6:1.9
	REL8_1_15:1.2
	REL8_2_11:1.7.2.1
	REL8_3_5:1.9
	REL8_1_14:1.2
	REL8_2_10:1.7.2.1
	REL8_3_4:1.9
	REL8_1_13:1.2
	REL8_2_9:1.7.2.1
	REL8_3_3:1.9
	REL8_1_12:1.2
	REL8_2_8:1.7.2.1
	REL8_3_2:1.9
	REL8_2_7:1.7.2.1
	REL8_3_1:1.9
	REL8_3_STABLE:1.9.0.2
	REL8_3_0:1.9
	REL8_3_RC2:1.9
	REL8_1_11:1.2
	REL8_2_6:1.7.2.1
	REL8_3_RC1:1.9
	REL8_3_BETA4:1.9
	REL8_3_BETA3:1.9
	REL8_3_BETA2:1.9
	REL8_3_BETA1:1.9
	REL8_1_10:1.2
	REL8_2_5:1.7.2.1
	REL8_1_9:1.2
	REL8_2_4:1.7
	REL8_1_8:1.2
	REL8_2_3:1.7
	REL8_1_7:1.2
	REL8_2_2:1.7
	REL8_1_6:1.2
	REL8_2_1:1.7
	REL8_2_STABLE:1.7.0.2
	REL8_2_0:1.7
	REL8_2_RC1:1.7
	REL8_2_BETA3:1.7
	REL8_2_BETA2:1.7
	REL8_1_5:1.2
	REL8_2_BETA1:1.7
	REL8_1_4:1.2
	REL8_1_3:1.2
	REL8_1_2:1.2
	REL8_1_1:1.2
	REL8_1_STABLE:1.2.0.2
	REL8_1_0:1.2
	REL8_1_0RC1:1.2
	REL8_1_0BETA4:1.2
	REL8_1_0BETA3:1.2
	REL8_1_0BETA2:1.2
	REL8_1_0BETA1:1.2;
locks; strict;
comment	@# @;


1.18
date	2010.08.17.04.37.21;	author petere;	state Exp;
branches;
next	1.17;

1.17
date	2010.04.21.20.54.19;	author tgl;	state Exp;
branches
	1.17.2.1;
next	1.16;

1.16
date	2010.04.03.07.22.57;	author petere;	state Exp;
branches;
next	1.15;

1.15
date	2009.10.07.22.14.16;	author alvherre;	state Exp;
branches;
next	1.14;

1.14
date	2009.09.19.10.23.26;	author petere;	state Exp;
branches;
next	1.13;

1.13
date	2009.09.18.05.00.41;	author petere;	state Exp;
branches;
next	1.12;

1.12
date	2009.03.28.03.26.02;	author momjian;	state Exp;
branches;
next	1.11;

1.11
date	2008.11.14.10.22.45;	author petere;	state Exp;
branches;
next	1.10;

1.10
date	2008.04.30.12.38.49;	author alvherre;	state Exp;
branches;
next	1.9;

1.9
date	2007.09.03.18.46.29;	author tgl;	state Exp;
branches;
next	1.8;

1.8
date	2007.05.15.19.43.51;	author neilc;	state Exp;
branches;
next	1.7;

1.7
date	2006.09.16.00.30.16;	author momjian;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	2006.06.18.15.38.36;	author petere;	state Exp;
branches;
next	1.5;

1.5
date	2006.04.25.14.56.04;	author momjian;	state Exp;
branches;
next	1.4;

1.4
date	2006.04.25.14.47.29;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	2005.12.18.02.17.16;	author petere;	state Exp;
branches;
next	1.2;

1.2
date	2005.07.31.17.19.17;	author tgl;	state Exp;
branches;
next	1.1;

1.1
date	2005.07.26.23.24.02;	author tgl;	state Exp;
branches;
next	;

1.7.2.1
date	2007.05.15.19.43.59;	author neilc;	state Exp;
branches;
next	;

1.17.2.1
date	2010.08.17.04.37.19;	author petere;	state Exp;
branches;
next	;


desc
@@


1.18
log
@Spell and markup checking
@
text
@<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.17 2010/04/21 20:54:19 tgl Exp $
PostgreSQL documentation
-->

<refentry id="SQL-ALTERROLE">
 <refmeta>
  <refentrytitle>ALTER ROLE</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>ALTER ROLE</refname>
  <refpurpose>change a database role</refpurpose>
 </refnamediv>

 <indexterm zone="sql-alterrole">
  <primary>ALTER ROLE</primary>
 </indexterm>

 <refsynopsisdiv>
<synopsis>
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> [ [ WITH ] <replaceable class="PARAMETER">option</replaceable> [ ... ] ]

<phrase>where <replaceable class="PARAMETER">option</replaceable> can be:</phrase>

      SUPERUSER | NOSUPERUSER
    | CREATEDB | NOCREATEDB
    | CREATEROLE | NOCREATEROLE
    | CREATEUSER | NOCREATEUSER
    | INHERIT | NOINHERIT
    | LOGIN | NOLOGIN
    | CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable>
    | [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<replaceable class="PARAMETER">password</replaceable>'
    | VALID UNTIL '<replaceable class="PARAMETER">timestamp</replaceable>'

ALTER ROLE <replaceable class="PARAMETER">name</replaceable> RENAME TO <replaceable>new_name</replaceable>

ALTER ROLE <replaceable class="PARAMETER">name</replaceable> [ IN DATABASE <replaceable class="PARAMETER">database_name</replaceable> ] SET <replaceable>configuration_parameter</replaceable> { TO | = } { <replaceable>value</replaceable> | DEFAULT }
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> [ IN DATABASE <replaceable class="PARAMETER">database_name</replaceable> ] SET <replaceable>configuration_parameter</replaceable> FROM CURRENT
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> [ IN DATABASE <replaceable class="PARAMETER">database_name</replaceable> ] RESET <replaceable>configuration_parameter</replaceable>
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> [ IN DATABASE <replaceable class="PARAMETER">database_name</replaceable> ] RESET ALL
</synopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>

  <para>
   <command>ALTER ROLE</command> changes the attributes of a
   <productname>PostgreSQL</productname> role.
  </para>

  <para>
   The first variant of this command listed in the synopsis can change
   many of the role attributes that can be specified in
   <xref linkend="sql-createrole">.
   (All the possible attributes are covered,
   except that there are no options for adding or removing memberships; use
   <xref linkend="SQL-GRANT"> and
   <xref linkend="SQL-REVOKE"> for that.)
   Attributes not mentioned in the command retain their previous settings.
   Database superusers can change any of these settings for any role.
   Roles having <literal>CREATEROLE</> privilege can change any of these
   settings, but only for non-superuser roles.
   Ordinary roles can only change their own password.
  </para>

  <para>
   The second variant changes the name of the role.
   Database superusers can rename any role.
   Roles having <literal>CREATEROLE</> privilege can rename non-superuser
   roles.
   The current session user cannot be renamed.
   (Connect as a different user if you need to do that.)
   Because <literal>MD5</>-encrypted passwords use the role name as
   cryptographic salt, renaming a role clears its password if the
   password is <literal>MD5</>-encrypted.
  </para>

  <para>
   The remaining variants change a role's session default for a configuration
   variable, either for all databases or, when the <literal>IN
   DATABASE</literal> clause is specified, only for sessions in
   the named database. Whenever the role subsequently
   starts a new session, the specified value becomes the session
   default, overriding whatever setting is present in
   <filename>postgresql.conf</> or has been received from the <command>postgres</command>
   command line. This only happens at login time; executing
   <xref linkend="sql-set-role"> or
   <xref linkend="sql-set-session-authorization"> does not cause new
   configuration values to be set.
   Settings set for all databases are overridden by database-specific settings
   attached to a role.
   Superusers can change anyone's session defaults. Roles having
   <literal>CREATEROLE</> privilege can change defaults for non-superuser
   roles. Ordinary roles can only set defaults for themselves.
   Certain configuration variables cannot be set this way, or can only be
   set if a superuser issues the command.
  </para>
 </refsect1>

 <refsect1>
  <title>Parameters</title>

    <variablelist>
     <varlistentry>
      <term><replaceable class="PARAMETER">name</replaceable></term>
      <listitem>
       <para>
        The name of the role whose attributes are to be altered.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><literal>SUPERUSER</literal></term>
      <term><literal>NOSUPERUSER</literal></term>
      <term><literal>CREATEDB</></term>
      <term><literal>NOCREATEDB</></term>
      <term><literal>CREATEROLE</literal></term>
      <term><literal>NOCREATEROLE</literal></term>
      <term><literal>CREATEUSER</literal></term>
      <term><literal>NOCREATEUSER</literal></term>
      <term><literal>INHERIT</literal></term>
      <term><literal>NOINHERIT</literal></term>
      <term><literal>LOGIN</literal></term>
      <term><literal>NOLOGIN</literal></term>
      <term><literal>CONNECTION LIMIT</literal> <replaceable class="parameter">connlimit</replaceable></term>
      <term><literal>PASSWORD</> <replaceable class="parameter">password</replaceable></term>
      <term><literal>ENCRYPTED</></term>
      <term><literal>UNENCRYPTED</></term>
      <term><literal>VALID UNTIL</literal> '<replaceable class="parameter">timestamp</replaceable>'</term>
      <listitem>
       <para>
        These clauses alter attributes originally set by
        <xref linkend="SQL-CREATEROLE">. For more information, see the
        <command>CREATE ROLE</command> reference page.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><replaceable>new_name</replaceable></term>
      <listitem>
       <para>
        The new name of the role.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
       <term><replaceable>database_name</replaceable></term>
       <listitem>
         <para>
           The name of the database the configuration variable should be set in.
         </para>
       </listitem>
     </varlistentry>

     <varlistentry>
      <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</> 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;
        <xref linkend="sql-set-role"> and
        <xref linkend="sql-set-session-authorization">
        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>
  <title>Notes</title>

  <para>
   Use <xref linkend="SQL-CREATEROLE">
   to add new roles, and <xref linkend="SQL-DROPROLE"> to remove a role.
  </para>

  <para>
   <command>ALTER ROLE</command> cannot change a role's memberships.
   Use <xref linkend="SQL-GRANT"> and
   <xref linkend="SQL-REVOKE">
   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 be logged in the client's command
   history or the server log.  <xref linkend="app-psql">
   contains a command
   <command>\password</command> that can be used to change a
   role's password without exposing the cleartext password.
  </para>

  <para>
   It is also possible to tie a
   session default to a specific database rather than to a role; see
   <xref linkend="sql-alterdatabase">.
   If there is a conflict, database-role-specific settings override role-specific
   ones, which in turn override database-specific ones.
  </para>
 </refsect1>

 <refsect1>
  <title>Examples</title>

  <para>
   Change a role's password:

<programlisting>
ALTER ROLE davide WITH PASSWORD 'hu8jmn3';
</programlisting>
  </para>

  <para>
   Remove a role's password:

<programlisting>
ALTER ROLE davide WITH PASSWORD NULL;
</programlisting>
  </para>

  <para>
   Change a password expiration date, specifying that the password
   should expire at midday on 4th May 2015 using
   the time zone which is one hour ahead of <acronym>UTC</>:
<programlisting>
ALTER ROLE chris VALID UNTIL 'May 4 12:00:00 2015 +1';
</programlisting>
  </para>

  <para>
   Make a password valid forever:
<programlisting>
ALTER ROLE fred VALID UNTIL 'infinity';
</programlisting>
  </para>

  <para>
   Give a role the ability to create other roles and new databases:

<programlisting>
ALTER ROLE miriam CREATEROLE CREATEDB;
</programlisting>
  </para>

  <para>
   Give a role a non-default setting of the
   <xref linkend="guc-maintenance-work-mem"> parameter:

<programlisting>
ALTER ROLE worker_bee SET maintenance_work_mem = 100000;
</programlisting>
  </para>

  <para>
   Give a role a non-default, database-specific setting of the
   <xref linkend="guc-client-min-messages"> parameter:

<programlisting>
ALTER ROLE fred IN DATABASE devel SET client_min_messages = DEBUG;
</programlisting>
  </para>
 </refsect1>

 <refsect1>
  <title>Compatibility</title>

  <para>
   The <command>ALTER ROLE</command> statement is a
   <productname>PostgreSQL</productname> extension.
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-createrole"></member>
   <member><xref linkend="sql-droprole"></member>
   <member><xref linkend="sql-set"></member>
  </simplelist>
 </refsect1>
</refentry>
@


1.17
log
@Enforce superuser permissions checks during ALTER ROLE/DATABASE SET, rather
than during define_custom_variable().  This entails rejecting an ALTER
command if the target variable doesn't have a known (non-placeholder)
definition, unless the calling user is superuser.  When the variable *is*
known, we can correctly apply the rule that only superusers can issue ALTER
for SUSET parameters.  This allows define_custom_variable to apply ALTER's
values for SUSET parameters at module load time, secure in the knowledge
that only a superuser could have set the ALTER value.  This change fixes a
longstanding gotcha in the usage of SUSET-level custom parameters; which
is a good thing to fix now that plpgsql defines such a parameter.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.16 2010/04/03 07:22:57 petere Exp $
d89 1
a89 1
   <filename>postgresql.conf</> or has been received from the postgres
@


1.17.2.1
log
@Spell and markup checking
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.17 2010/04/21 20:54:19 tgl Exp $
d89 1
a89 1
   <filename>postgresql.conf</> or has been received from the <command>postgres</command>
@


1.16
log
@Remove unnecessary xref endterm attributes and title ids

The endterm attribute is mainly useful when the toolchain does not support
automatic link target text generation for a particular situation.  In  the
past, this was required by the man page tools for all reference page links,
but that is no longer the case, and it now actually gets in the way of
proper automatic link text generation.  The only remaining use cases are
currently xrefs to refsects.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.15 2009/10/07 22:14:16 alvherre Exp $
d27 1
a27 1
    
d36 1
a36 1
    | VALID UNTIL '<replaceable class="PARAMETER">timestamp</replaceable>' 
d57 1
a57 1
   many of the role attributes that can be specified in 
d82 5
a86 4
  <para> 
   The remaining variants change a role's session default for a configuration variable 
   for all databases or, when the <literal>IN DATABASE</literal> clause is specified,
   for the named database. Whenever the role subsequently
d90 6
a95 4
   command line. This only happens at login time, so configuration
   settings associated with a role to which you've <xref
   linkend="sql-set-role"> will be ignored. Settings set to
   a role directly are overridden by any database specific settings attached to a role.
d98 2
a99 1
   roles. Certain variables cannot be set this way, or can only be
d176 1
a176 1
        If used in conjunction with <literal>IN DATABASE</literal>, the configuration
d181 4
a184 3
        Role-specific variable setting take effect only at login;
        <xref linkend="sql-set-role">
        does not process role-specific variable settings.
d218 2
a219 2
   <command>\password</command> that can be used to safely change a
   role's password.
d284 2
a285 2
    Give a role a non-default, database-specific setting of the 
  <xref linkend="guc-client-min-messages"> parameter:
d295 1
a295 1
    
@


1.15
log
@Make it possibly to specify GUC params per user and per database.

Create a new catalog pg_db_role_setting where they are now stored, and better
encapsulate the code that deals with settings into its realm.  The old
datconfig and rolconfig columns are removed.

psql has gained a \drds command to display the settings.

Backwards compatibility warning: while the backwards-compatible system views
still have the config columns, they no longer completely represent the
configuration for a user or database.

Catalog version bumped.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.14 2009/09/19 10:23:26 petere Exp $
d8 1
a8 1
  <refentrytitle id="sql-alterrole-title">ALTER ROLE</refentrytitle>
d58 1
a58 1
   <xref linkend="sql-createrole" endterm="sql-createrole-title">.
d61 2
a62 2
   <xref linkend="SQL-GRANT" endterm="SQL-GRANT-title"> and
   <xref linkend="SQL-REVOKE" endterm="SQL-REVOKE-title"> for that.)
d91 1
a91 1
   linkend="sql-set-role" endterm="sql-set-role-title"> will be ignored. Settings set to
d134 1
a134 2
        <xref linkend="SQL-CREATEROLE"
        endterm="SQL-CREATEROLE-title">. For more information, see the
d178 1
a178 1
        <xref linkend="sql-set-role" endterm="sql-set-role-title">
d183 1
a183 1
        See <xref linkend="sql-set" endterm="sql-set-title"> and <xref
d196 2
a197 3
   Use <xref linkend="SQL-CREATEROLE" endterm="SQL-CREATEROLE-title">
   to add new roles, and <xref linkend="SQL-DROPROLE"
   endterm="SQL-DROPROLE-title"> to remove a role.
d202 2
a203 2
   Use <xref linkend="SQL-GRANT" endterm="SQL-GRANT-title"> and
   <xref linkend="SQL-REVOKE" endterm="SQL-REVOKE-title">
d211 2
a212 2
   history or the server log.  <xref linkend="app-psql"
   endterm="app-psql-title"> contains a command
d220 1
a220 1
   <xref linkend="sql-alterdatabase" endterm="sql-alterdatabase-title">.
d301 3
a303 3
   <member><xref linkend="sql-createrole" endterm="sql-createrole-title"></member>
   <member><xref linkend="sql-droprole" endterm="sql-droprole-title"></member>
   <member><xref linkend="sql-set" endterm="sql-set-title"></member>
@


1.14
log
@Make the placeholder naming in the synopses of the SQL help more consistent
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.13 2009/09/18 05:00:41 petere Exp $
d40 4
a43 4
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> SET <replaceable>configuration_parameter</replaceable> { TO | = } { <replaceable>value</replaceable> | DEFAULT }
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> SET <replaceable>configuration_parameter</replaceable> FROM CURRENT
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> RESET <replaceable>configuration_parameter</replaceable>
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> RESET ALL
d83 3
a85 2
   The remaining variants change a role's session default for a
   specified configuration variable. Whenever the role subsequently
d91 2
a92 1
   linkend="sql-set-role" endterm="sql-set-role-title"> will be ignored.
d151 9
d173 2
d223 2
a224 2
   Role-specific settings override database-specific
   ones if there is a conflict.
d279 9
@


1.13
log
@Easier to translate psql help

Instead of requiring translators to translate the entire SQL command
synopses, change create_help.pl to only require them to translate the
placeholders, and paste those into the synopsis using a printf mechanism.
Make some small updates to the markup to make it easier to parse.

Note: This causes msgmerge of gettext 0.17 to segfault.  You will need
the patch from https://savannah.gnu.org/bugs/?27474 to make it work.
msgmerge usually only runs on babel.postgresql.org, however.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.12 2009/03/28 03:26:02 momjian Exp $
d38 1
a38 1
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> RENAME TO <replaceable>newname</replaceable>
d140 1
a140 1
      <term><replaceable>newname</replaceable></term>
@


1.12
log
@Better document that SET ROLE does not uset ALTER ROLE SET settings;
suggested wording from Josh Berkus.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.11 2008/11/14 10:22:45 petere Exp $
d26 1
a26 1
where <replaceable class="PARAMETER">option</replaceable> can be:
@


1.11
log
@Set SQL man pages to be section 7 by default, and only transform them to
another section if required by the platform (instead of the old way of
building them in section "l" and always transforming them to the
platform-specific section).

This speeds up the installation on common platforms, and it avoids some
funny business with the man page tools and build process.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.10 2008/04/30 12:38:49 alvherre Exp $
d82 12
a93 13
  <para>
   The remaining variants change a role's session default for
   a specified configuration variable.  Whenever the role subsequently
   starts a new session, the specified value becomes the session default,
   overriding whatever setting is present in <filename>postgresql.conf</>
   or has been received from the <command>postgres</command> command line.
   (For a role without <literal>LOGIN</> privilege, session defaults have
   no effect.)
   Ordinary roles can change their own session defaults.
   Superusers can change anyone's session defaults.
   Roles having <literal>CREATEROLE</> privilege can change defaults for
   non-superuser roles.
   Certain variables cannot be set this way, or can only be
d165 6
@


1.10
log
@Add example showing how to remove a password from a role.

Andreas Scherbaum
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.9 2007/09/03 18:46:29 tgl Exp $
d9 1
@


1.9
log
@Support SET FROM CURRENT in CREATE/ALTER FUNCTION, ALTER DATABASE, ALTER ROLE.
(Actually, it works as a plain statement too, but I didn't document that
because it seems a bit useless.)  Unify VariableResetStmt with
VariableSetStmt, and clean up some ancient cruft in the representation of
same.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.8 2007/05/15 19:43:51 neilc Exp $
d221 8
@


1.8
log
@Fix a bunch of bad grammar in the docs: "<link>, which see for more
information" is un-good English.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.7 2006/09/16 00:30:16 momjian Exp $
d40 1
d42 1
d82 1
a82 1
   The third and the fourth variant change a role's session default for
d160 2
@


1.7
log
@Remove emacs info from footer of SGML files.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.6 2006/06/18 15:38:36 petere Exp $
d55 2
a56 2
   <xref linkend="sql-createrole" endterm="sql-createrole-title">,
   which see for details.  (All the possible attributes are covered,
d130 3
a132 2
        <xref linkend="SQL-CREATEROLE" endterm="SQL-CREATEROLE-title">,
        which see for more information.
@


1.7.2.1
log
@Fix a bunch of bad grammar in the docs: "<link>, which see for more
information" is un-good English.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.7 2006/09/16 00:30:16 momjian Exp $
d55 2
a56 2
   <xref linkend="sql-createrole" endterm="sql-createrole-title">.
   (All the possible attributes are covered,
d130 2
a131 3
        <xref linkend="SQL-CREATEROLE"
        endterm="SQL-CREATEROLE-title">. For more information, see the
        <command>CREATE ROLE</command> reference page.
@


1.6
log
@Merge postmaster and postgres command into just postgres.  postmaster
symlink is kept for now for compatibility.  To call single-user mode, use
postgres --single.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.5 2006/04/25 14:56:04 momjian Exp $
a267 17

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
@


1.5
log
@Call SET varaiables "configuration_parameter"s in the documentation.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.4 2006/04/25 14:47:29 momjian Exp $
d84 1
a84 1
   or has been received from the <command>postmaster</command> command line.
@


1.4
log
@Change "parameter" to "varname" in the alter role and alter user
documentation sections.  Also update SET/RESET to be consistent.

Nicolas Barbier
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.3 2005/12/18 02:17:16 petere Exp $
d39 2
a40 2
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> SET <replaceable>varname</replaceable> { TO | = } { <replaceable>value</replaceable> | DEFAULT }
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> RESET <replaceable>varname</replaceable>
d146 1
a146 1
      <term><replaceable>varname</replaceable></term>
@


1.3
log
@Add new psql command \password for changing role password with client-side
password encryption.  Also alter createuser command to the same effect.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.2 2005/07/31 17:19:17 tgl Exp $
d39 2
a40 2
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> SET <replaceable>parameter</replaceable> { TO | = } { <replaceable>value</replaceable> | DEFAULT }
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> RESET <replaceable>parameter</replaceable>
d146 1
a146 1
      <term><replaceable>parameter</replaceable></term>
@


1.2
log
@Add per-user and per-database connection limit options.
This patch also includes preliminary update of pg_dumpall for roles.
Petr Jelinek, with review by Bruce Momjian and Tom Lane.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.1 2005/07/26 23:24:02 tgl Exp $
d186 10
@


1.1
log
@Basic documentation for ROLEs.  The user-manag chapter still needs to
be rewritten, but at least the reference pages are reasonably sane.
@
text
@d2 1
a2 1
$PostgreSQL$
d33 1
d122 1
@

