1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
10
HREF="mailto:pgsql-docs@postgresql.org"><LINK
12
TITLE="PostgreSQL 9.1beta1 Documentation"
13
HREF="index.html"><LINK
15
TITLE="PostgreSQL Client Applications"
16
HREF="reference-client.html"><LINK
19
HREF="app-clusterdb.html"><LINK
22
HREF="app-createlang.html"><LINK
25
HREF="stylesheet.css"><META
26
HTTP-EQUIV="Content-Type"
27
CONTENT="text/html; charset=ISO-8859-1"><META
29
CONTENT="2011-04-27T21:20:33"></HEAD
35
SUMMARY="Header navigation table"
47
>PostgreSQL 9.1beta1 Documentation</A
57
HREF="app-clusterdb.html"
67
HREF="app-clusterdb.html"
81
HREF="app-createlang.html"
90
HREF="app-createlang.html"
114
>createdb -- create a new <SPAN
119
CLASS="REFSYNOPSISDIV"
132
>connection-option</I
154
NAME="R1-APP-CREATEDB-1"
163
> creates a new <SPAN
170
> Normally, the database user who executes this command becomes the owner of
172
However, a different owner can be specified via the <TT
176
option, if the executing user has appropriate privileges.
182
> is a wrapper around the
187
HREF="sql-createdatabase.html"
190
There is no effective difference between creating databases via
191
this utility and via other methods for accessing the server.
205
> accepts the following command-line arguments:
221
> Specifies the name of the database to be created. The name must be
222
unique among all <SPAN
225
> databases in this cluster.
226
The default is to create a database with the same name as the
239
> Specifies a comment to be associated with the newly created
263
> Specifies the default tablespace for the database.
276
> Echo the commands that <SPAN
280
and sends to the server.
303
> Specifies the locale to be used in this database. This is equivalent
304
to specifying both <TT
325
> Specifies the LC_COLLATE setting to be used in this database.
340
> Specifies the LC_CTYPE setting to be used in this database.
363
> Specifies the character encoding scheme to be used in this
364
database. The character sets supported by the
368
> server are described in
370
HREF="multibyte.html#MULTIBYTE-CHARSET-SUPPORTED"
395
> Specifies the database user who will own the new database.
418
> Specifies the template database from which to build this database.
447
> Show help about <SPAN
476
> correspond to options of the underlying
478
HREF="sql-createdatabase.html"
480
>; see there for more information
487
> also accepts the following
488
command-line arguments for connection parameters:
515
> Specifies the host name of the machine on which the
516
server is running. If the value begins with a slash, it is used
517
as the directory for the Unix domain socket.
540
> Specifies the TCP port or the local Unix domain socket file
541
extension on which the server is listening for connections.
564
> User name to connect as.
577
> Never issue a password prompt. If the server requires
578
password authentication and a password is not available by
579
other means such as a <TT
583
connection attempt will fail. This option can be useful in
584
batch jobs and scripts where no user is present to enter a
602
password before connecting to a database.
605
> This option is never essential, since
609
> will automatically prompt
610
for a password if the server demands password authentication.
615
connection attempt finding out that the server wants a password.
616
In some cases it is worth typing <TT
647
> If set, the name of the database to create, unless overridden on
664
> Default connection parameters. <TT
668
determines the name of the database to create, if it is not
669
specified on the command line or by <TT
678
> This utility, like most other <SPAN
682
also uses the environment variables supported by <SPAN
687
HREF="libpq-envars.html"
700
> In case of difficulty, see <A
701
HREF="sql-createdatabase.html"
711
discussions of potential problems and error messages.
712
The database server must be running at the
713
targeted host. Also, any default connection settings and environment
714
variables used by the <SPAN
729
> To create the database <TT
746
> To create the database <TT
753
>, port 5000, using the
757
> encoding scheme with a look at the
766
>createdb -p 5000 -h eden -E LATIN1 -e demo</KBD
769
CLASS="COMPUTEROUTPUT"
770
>CREATE DATABASE demo ENCODING 'LATIN1';</SAMP
783
HREF="app-dropdb.html"
789
HREF="sql-createdatabase.html"
797
SUMMARY="Footer navigation table"
808
HREF="app-clusterdb.html"
826
HREF="app-createlang.html"
845
HREF="reference-client.html"
b'\\ No newline at end of file'