WARNING

This text was automatically converted from troff me macros to HTML. Information may have been lost, added, or changed in the process. Lars Aronsson and Lysator do not guarantee the correctness of this HTML document.

NAME

createdb *- create a database

SYNOPSIS

createdb [-p port] [-h host] username

DESCRIPTION

Createdb creates a new database. The person who executes this command becomes the database administrator ( DBA ) for this database. The DBA has special powers not granted to ordinary users. Namely, they can destroy the database they created.

Dbname is the name of the database to be created. The name must be unique among all POSTGRES databases.

The argument port and hostname are the same as in the terminal monitor - they are used to connect to the postmaster using the TCP/IP port port running on the database server hostname. The defaults are to the local machine (localhost) and to the default port (4321).

SEE ALSO

destroydb(unix), initdb(unix), createdb(commands).

DIAGNOSTICS

Error: Failed to connect to backend (host=xxx, port=xxx)

createdb could not attach to the postmaster on the specified host and port. If you see this message, check that the postmaster is running on the proper host and that the proper port is specified.

You are not a valid POSTGRES user

You do not have a users file entry, and can not do anything with POSTGRES at all.

<dbname> already exists

The database already exists.