Home Explore Blog CI



postgresql

2nd chunk of `doc/src/sgml/ref/createuser.sgml`
80e2d039f46af16b667e16ceb85ea111f4b15fceac8e7e510000000100000fa0
 option, giving it the right to grant membership in the
        new role to others.  Multiple existing roles can be specified by
        writing multiple <option>-a</option> switches.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-c <replaceable class="parameter">number</replaceable></option></term>
      <term><option>--connection-limit=<replaceable class="parameter">number</replaceable></option></term>
      <listitem>
       <para>
        Set a maximum number of connections for the new user.
        The default is to set no limit.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-d</option></term>
      <term><option>--createdb</option></term>
      <listitem>
       <para>
        The new user will be allowed to create databases.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-D</option></term>
      <term><option>--no-createdb</option></term>
      <listitem>
       <para>
        The new user will not be allowed to create databases.  This is the
        default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-e</option></term>
      <term><option>--echo</option></term>
      <listitem>
       <para>
        Echo the commands that <application>createuser</application> generates
        and sends to the server.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-E</option></term>
      <term><option>--encrypted</option></term>
      <listitem>
       <para>
        This option is obsolete but still accepted for backward
        compatibility.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-g <replaceable class="parameter">role</replaceable></option></term>
      <term><option>--member-of=<replaceable class="parameter">role</replaceable></option></term>
      <term><option>--role=<replaceable class="parameter">role</replaceable></option> (deprecated)</term>
      <listitem>
       <para>
        Specifies the new role should be automatically added as a member
        of the specified existing role. Multiple existing roles can be
        specified by writing multiple <option>-g</option> switches.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-i</option></term>
      <term><option>--inherit</option></term>
      <listitem>
       <para>
        The new role will automatically inherit privileges of roles
        it is a member of.
        This is the default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-I</option></term>
      <term><option>--no-inherit</option></term>
      <listitem>
       <para>
        The new role will not automatically inherit privileges of roles
        it is a member of.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--interactive</option></term>
      <listitem>
       <para>
        Prompt for the user name if none is specified on the command line, and
        also prompt for whichever of the options
        <option>-d</option>/<option>-D</option>,
        <option>-r</option>/<option>-R</option>,
        <option>-s</option>/<option>-S</option> is not specified on the command
        line.  (This was the default behavior up to PostgreSQL 9.1.)
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-l</option></term>
      <term><option>--login</option></term>
      <listitem>
       <para>
        The new user will be allowed to log in (that is, the user name
        can be used as the initial session user identifier).
        This is the default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-L</option></term>
      <term><option>--no-login</option></term>
      <listitem>
       <para>
 

Title: createuser Options (Continued)
Summary
This section describes more options for the `createuser` command. These include adding a role as admin, setting connection limits, allowing or disallowing database creation, echoing commands sent to the server, adding the new role as a member of another role, controlling privilege inheritance, enabling interactive mode, and allowing or disallowing login.