~ubuntu-branches/debian/squeeze/pgadmin3/squeeze

« back to all changes in this revision

Viewing changes to docs/en_US/pg/manage-ag-createdb.html

  • Committer: Bazaar Package Importer
  • Author(s): Raphael Enrici, src/frm/frmBackup.cpp, debian/control
  • Date: 2006-10-06 21:06:48 UTC
  • mfrom: (1.1.3 upstream) (3 etch)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20061006210648-8ebo8o2zu28ydg0d
Tags: 1.4.3-2
* Patched frmBackup.cpp to ensure the schema is specified when backing up
  individual tables. (Closes: #387256)
  [src/frm/frmBackup.cpp]
* Cleaned up and updated description of the package. (Closes: #379188)
  [debian/control]

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
<title>19.2.�Creating a Database</title>
5
5
<link rel="stylesheet" href="stylesheet.css" type="text/css">
6
6
<link rev="made" href="pgsql-docs@postgresql.org">
7
 
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
8
 
<link rel="start" href="index.html" title="PostgreSQL 8.1.3 Documentation">
 
7
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
 
8
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
9
9
<link rel="up" href="managing-databases.html" title="Chapter�19.�Managing Databases">
10
10
<link rel="prev" href="managing-databases.html" title="Chapter�19.�Managing Databases">
11
11
<link rel="next" href="manage-ag-templatedbs.html" title="19.3.�Template Databases">
 
12
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
12
13
</head>
13
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="sect1" lang="en">
14
15
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
17
18
   server must be up and running (see <a href="postmaster-start.html" title="16.3.�Starting the Database Server">Section�16.3, &#8220;Starting the Database Server&#8221;</a>).
18
19
  </p>
19
20
<p>   Databases are created with the SQL command
20
 
   <a href="sql-createdatabase.html">CREATE DATABASE</a>:<a name="id606243"></a>
 
21
   <a href="sql-createdatabase.html">CREATE DATABASE</a>:<a name="id658945"></a>
21
22
</p>
22
23
<pre class="synopsis">CREATE DATABASE <em class="replaceable"><code>name</code></em>;</pre>
23
24
<p>
24
25
   where <em class="replaceable"><code>name</code></em> follows the usual rules for
25
 
   <span class="acronym">SQL</span> identifiers.  The current role automatically
 
26
   <acronym class="acronym">SQL</acronym> identifiers.  The current role automatically
26
27
   becomes the owner of the new database. It is the privilege of the
27
28
   owner of a database to remove it later on (which also removes all
28
29
   the objects in it, even if they have a different owner).
36
37
   <code class="command">initdb</code> command when the data storage area is
37
38
   initialized. (See <a href="creating-cluster.html" title="16.2.�Creating a Database Cluster">Section�16.2, &#8220;Creating a Database Cluster&#8221;</a>.)  This
38
39
   database is called
39
 
   <code class="literal">postgres</code>.<a name="id606326"></a> So to
 
40
   <code class="literal">postgres</code>.<a name="id659028"></a> So to
40
41
   create the first &#8220;<span class="quote">ordinary</span>&#8221; database you can connect to
41
42
   <code class="literal">postgres</code>.
42
43
  </p>
43
44
<p>   A second database,
44
 
   <code class="literal">template1</code>,<a name="id606354"></a>
 
45
   <code class="literal">template1</code>,<a name="id659056"></a>
45
46
   is also created by
46
47
   <code class="command">initdb</code>.  Whenever a new database is created within the
47
48
   cluster, <code class="literal">template1</code> is essentially cloned.
53
54
  </p>
54
55
<p>   As a convenience, there is a program that you can
55
56
   execute from the shell to create new databases,
56
 
   <code class="command">createdb</code>.<a name="id606414"></a>
 
57
   <code class="command">createdb</code>.<a name="id659116"></a>
57
58
 
58
59
</p>
59
60
<pre class="synopsis">createdb <em class="replaceable"><code>dbname</code></em></pre>