aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/create_database.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/ref/create_database.sgml')
-rw-r--r--doc/src/sgml/ref/create_database.sgml75
1 files changed, 40 insertions, 35 deletions
diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml
index cb0f18a589e..0be80b994c9 100644
--- a/doc/src/sgml/ref/create_database.sgml
+++ b/doc/src/sgml/ref/create_database.sgml
@@ -1,6 +1,11 @@
+<!--
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.9 1999/07/22 15:09:07 thomas Exp $
+Postgres documentation
+-->
+
<refentry id="SQL-CREATEDATABASE">
<refmeta>
- <refentrytitle>
+ <refentrytitle id="sql-createdatabase-title">
CREATE DATABASE
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
@@ -15,7 +20,7 @@
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
- <date>1998-04-15</date>
+ <date>1999-07-20</date>
</refsynopsisdivinfo>
<synopsis>
CREATE DATABASE <replaceable class="PARAMETER">name</replaceable> [ WITH LOCATION = '<replaceable class="parameter">dbpath</replaceable>' ]
@@ -43,12 +48,7 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable> [ WITH LOCATIO
<term><replaceable class="parameter">dbpath</replaceable></term>
<listitem>
<para>
- An alternate location can be specified as either an
- environment variable known to the backend server
- (e.g. '<envar>PGDATA2</envar>') or as an absolute path name
- (e.g. '<filename>/usr/local/pgsql/data</filename>').
- In either case, the location must be pre-configured
- by <command>initlocation</command>.
+ An alternate location for the new database. See below for caveats.
</para>
</listitem>
</varlistentry>
@@ -114,6 +114,16 @@ ERROR: Unable to create database directory <replaceable class="parameter">direc
The creator becomes the administrator of the new database.
</para>
+ <para>
+ An alternate location can be specified as either an
+ environment variable known to the backend server
+ (e.g. '<envar>PGDATA2</envar>') or, if the server is built to
+ allow it, as an absolute path name
+ (e.g. '<filename>/usr/local/pgsql/data</filename>').
+ In either case, the location must be pre-configured
+ by <command>initlocation</command>.
+ </para>
+
<refsect2 id="R2-SQL-CREATEDATABASE-3">
<refsect2info>
<date>1998-04-15</date>
@@ -128,6 +138,28 @@ ERROR: Unable to create database directory <replaceable class="parameter">direc
<para>
Use <command>DROP DATABASE</command> to remove a database.
</para>
+
+ <para>
+ There are security and data integrity issues
+ involved with using alternate database locations
+ specified with absolute path names, and by default
+ only an environment variable known to the backend may be
+ specified for an alternate location.
+ See the Administrator's Guide for more information.
+ </para>
+
+<!--
+comment from Olly; response from Thomas...
+ <comment>
+ initlocation does not create a PG_VERSION file in the specified location.
+ How will Postgres handle the situation if it is upgraded to an
+ incompatible database version?
+ </comment>
+ Hmm. This isn't an issue since the upgrade would do
+ a dump/reload from the main database area also.
+ Not sure if the dump/reload would guarantee that
+ the alternate data area gets refreshed though...
+-->
</refsect2>
</refsect1>
@@ -166,31 +198,6 @@ ERROR: Unable to create database directory <replaceable class="parameter">direc
</para>
</refsect1>
- <refsect1 id="R1-SQL-CREATEDATABASE-3">
- <title>
- Bugs
- </title>
- <para>
- There are security and data integrity issues
- involved with using alternate database locations
- specified with absolute path names, and by default
- only an environment variable known to the backend may be
- specified for an alternate location.
- See the Administrator's Guide for more information.
- </para>
- </refsect1>
-
-<!--
-comment from Olly; response from Thomas...
- <comment>
- initlocation does not create a PG_VERSION file in the specified location.
- How will Postgres handle the situation if it is upgraded to an
- incompatible database version?
- </comment>
-Hmm. This isn't an issue since the upgrade would do a dump/reload from the main database area also.
-Not sure if the dump/reload would guarantee that the alternate data area gets refreshed though...
--->
-
<refsect1 id="R1-SQL-CREATEDATABASE-4">
<title>
Compatibility
@@ -205,8 +212,6 @@ Not sure if the dump/reload would guarantee that the alternate data area gets re
</title>
<para>
There is no <command>CREATE DATABASE</command> statement in SQL92.
- </para>
- <para>
The equivalent command in standard SQL is <command>CREATE SCHEMA</command>.
</para>
</refsect2>