

If this parameter is not specified, PostgreSQL will choose a suitable OID automatically. The object identifier to be used for the new database. If true, then this database can be cloned by any user with CREATEDB privileges if false (the default), then only superusers or the owner of the database can clone it. How many concurrent connections can be made to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT/ REVOKE CONNECT). If false then no one can connect to this database.

See CREATE TABLESPACE for more information. This tablespace will be the default tablespace used for objects created in this database. The name of the tablespace that will be associated with the new database, or DEFAULT to use the template database's tablespace.
#CARA CREATE DATABASE MYSQL D CMD HOW TO#
See also ALTER DATABASE for how to handle database collation version mismatches. This option is intended to be used by pg_upgrade for copying the version from an existing installation. 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. Specifies the collation version string to store with the database. The available choices depend on the operating system and build options.

Specifies the provider to use for the default collation in this database. Specifies the ICU locale ID if the ICU locale provider is used. The default is to use the character classification of the template database. This affects the categorization of characters, e.g., lower, upper and digit. lc_ctypeĬharacter classification ( LC_CTYPE) to use in the new database. The default is to use the collation order of the template database. This affects the sort order applied to strings, e.g., in queries with ORDER BY, as well as the order used in indexes on text columns. lc_collateĬollation order ( LC_COLLATE) to use in the new database. If you want to make them the default for a specific database, you can use ALTER DATABASE. The other locale settings lc_messages, lc_monetary, lc_numeric, and lc_time are not fixed per database and are not set by this command. This is a shortcut for setting LC_COLLATE and LC_CTYPE at once. In some situations, this may have a noticeable negative impact on overall system performance. While this does reduce the write-ahead log volume substantially, especially if the template database is large, it also forces the system to perform a checkpoint both before and after the creation of the new database. Each such record represents copying an entire directory to a new location at the filesystem level. This strategy writes a small record to the write-ahead log for each tablespace used by the target database. The older FILE_COPY strategy is also available. This is the most efficient strategy in cases where the template database is small, and therefore it is the default. If the WAL_LOG strategy is used, the database will be copied block by block and each block will be separately written to the write-ahead log. Strategy to be used in creating the new database. The character sets supported by the PostgreSQL server are described in Section 24.3.1. Specify a string constant (e.g., 'SQL_ASCII'), or an integer encoding number, or DEFAULT to use the default encoding (namely, the encoding of the template database). encodingĬharacter set encoding to use in the new database. The name of the template from which to create the new database, or DEFAULT to use the default template ( template1). To create a database owned by another role, you must be a direct or indirect member of that role, or be a superuser. The role name of the user who will own the new database, or DEFAULT to use the default (namely, the user executing the command).
