Home Explore Blog CI



postgresql

5th chunk of `doc/src/sgml/ref/create_database.sgml`
d8bab23c932888353e7ce453fda4de13c2586f4d6fcdd2310000000100000fa4
 supported for ICU only.
        See <xref linkend="icu-tailoring-rules"/> for details.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="create-database-locale-provider">
      <term><replaceable>locale_provider</replaceable></term>

      <listitem>
       <para>
        Specifies the provider to use for the default collation in this
        database.  Possible values are <literal>builtin</literal>,
        <literal>icu</literal><indexterm><primary>ICU</primary></indexterm>
        (if the server was built with ICU support) or <literal>libc</literal>.
        By default, the provider is the same as that of the <xref
        linkend="create-database-template"/>. See <xref
        linkend="locale-providers"/> for details.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="create-database-collation-version">
      <term><replaceable>collation_version</replaceable></term>

      <listitem>
       <para>
        Specifies the collation version string to store with the database.
        Normally, this should be omitted, which will cause the version to be
        computed from the actual version of the database collation as provided
        by the operating system.  This option is intended to be used by
        <command>pg_upgrade</command> for copying the version from an existing
        installation.
       </para>

       <para>
        See also <xref linkend="sql-alterdatabase"/> for how to handle
        database collation version mismatches.
       </para>
     </listitem>
    </varlistentry>
     <varlistentry id="create-database-tablespace-name">
      <term><replaceable class="parameter">tablespace_name</replaceable></term>
      <listitem>
       <para>
        The name of the tablespace that will be associated with the
        new database, or <literal>DEFAULT</literal> to use the
        template database's tablespace. This
        tablespace will be the default tablespace used for objects
        created in this database. See
        <xref linkend="sql-createtablespace"/>
        for more information.
       </para>
      </listitem>
     </varlistentry>

      <varlistentry id="create-database-allowconn">
       <term><replaceable class="parameter">allowconn</replaceable></term>
       <listitem>
        <para>
         If false then no one can connect to this database.  The default is
         true, allowing connections (except as restricted by other mechanisms,
         such as <literal>GRANT</literal>/<literal>REVOKE CONNECT</literal>).
        </para>
       </listitem>
      </varlistentry>

      <varlistentry id="create-database-connlimit">
      <term><replaceable class="parameter">connlimit</replaceable></term>
      <listitem>
       <para>
        How many concurrent connections can be made
        to this database.  -1 (the default) means no limit.
       </para>
      </listitem>
     </varlistentry>

      <varlistentry id="create-database-istemplate">
       <term><replaceable class="parameter">istemplate</replaceable></term>
       <listitem>
        <para>
         If true, then this database can be cloned by any user with <literal>CREATEDB</literal>
         privileges; if false (the default), then only superusers or the owner
         of the database can clone it.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry id="create-database-oid">
       <term><replaceable class="parameter">oid</replaceable></term>
       <listitem>
        <para>
         The object identifier to be used for the new database. If this
         parameter is not specified, <productname>PostgreSQL</productname>
         will choose a suitable OID automatically. This parameter is primarily
         intended for internal use by <application>pg_upgrade</application>,
         and only <application>pg_upgrade</application> can specify a value
         less than 16384.
        </para>
       </listitem>
      </varlistentry>

    </variablelist>

  <para>

Title: CREATE DATABASE Parameters: Collation Version, Tablespace, Connection Limits, and Template Options
Summary
This section details the remaining parameters for the `CREATE DATABASE` command, including `collation_version` for specifying the collation version string, `tablespace_name` for associating a tablespace with the database, `allowconn` to control database connections, `connlimit` to limit concurrent connections, `istemplate` to allow cloning by users with CREATEDB privileges, and `oid` to specify the object identifier of the new database, primarily for internal use by pg_upgrade.