createdb [ options ] dbname [ description ]
Use this parameter to supply the hostname of the machine postmaster is running on.
Use this parameter to provide the TCP/IP port or socket file postmaster is listening on.
Use this parameter to specify the username to connect as.
Pass this parameter to indicate that createdb should prompt for a password.
Use this parameter to echo all queries that createdb generates.
Pass this parameter to have createdb run in quiet mode. When in quiet mode, no responses will be displayed.
Use this parameter to specify an alternate location for the database to be created in.
Use this parameter to supply the name of the template database to build the new database's tables from.
Use this parameter to specify the character encoding scheme for the new database.
Use this parameter to provide a unique name for the new database. If left unspecified, the new database's name will be set to your username.
This optional clause gives the user the ability to specify a an associated comment with the newly created database.
The options -h, -p, -U, -W, and -e are passed on literally to psql. The options -D, -T, and -E are converted into options for the create database SQL command. Refer to the Create Database reference section for further information.
This message is displayed if the database is created successfully.
This message is displayed if creation of the new database failed.
This message is displayed when creation of the database's description failed, though the database itself was created.
Use createdb to create a new database on the system. Its ownership will be set to the system account that executed the command. The createdb command is a script executable from that shell that is essentially a wrapper for the SQL CREATE DATABASE command. line