summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2000-01-18 00:03:37 +0000
committerPeter Eisentraut <peter_e@gmx.net>2000-01-18 00:03:37 +0000
commit28125ed5e0b967b71dc9cc686a8e16e1dd9996f8 (patch)
treecc64a854f38a797efcd94c8b4eaa14aaed29cd26 /doc/src
parent9e0b4634732d089237c5eaecb91ad4b1e943bc0f (diff)
Updated user interfaces on initdb, initlocation, pg_dump, ipcclean to a GNU-compliant'ish state.
Made ipcclean work on Linux.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/initdb.sgml6
-rw-r--r--doc/src/sgml/ref/initlocation.sgml158
-rw-r--r--doc/src/sgml/ref/pg_dump.sgml17
-rw-r--r--doc/src/sgml/ref/pg_dumpall.sgml8
4 files changed, 35 insertions, 154 deletions
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index e08ab377f9c..5f3bce4f835 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.7 2000/01/15 18:30:27 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.8 2000/01/18 00:03:34 petere Exp $
Postgres documentation
-->
@@ -26,7 +26,7 @@ Postgres documentation
initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ]
[ --sysid|-i <replaceable class="parameter">sysid</replaceable> ]
[ --pwprompt|-W ]
- [ --encoding|-e <replaceable class="parameter">encoding</replaceable> ]
+ [ --encoding|-E <replaceable class="parameter">encoding</replaceable> ]
[ --pglib|-L <replaceable class="parameter">libdir</replaceable> ]
[ --username|-u <replaceable class="parameter">name</replaceable> ]
[ --noclean | -n ] [ --debug | -d ] [ --template | -t ]
@@ -85,7 +85,7 @@ initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ]
<varlistentry>
<term>--encoding=<replaceable class="parameter">encoding</replaceable></term>
- <term>-e <replaceable class="parameter">encoding</replaceable></term>
+ <term>-E <replaceable class="parameter">encoding</replaceable></term>
<listitem>
<para>
Selects the multibyte encoding of the template database. This will also
diff --git a/doc/src/sgml/ref/initlocation.sgml b/doc/src/sgml/ref/initlocation.sgml
index edbc6613ed0..2a123498663 100644
--- a/doc/src/sgml/ref/initlocation.sgml
+++ b/doc/src/sgml/ref/initlocation.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.4 1999/07/22 15:09:12 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.5 2000/01/18 00:03:34 petere Exp $
Postgres documentation
-->
@@ -15,17 +15,15 @@ Postgres documentation
<application>initlocation</application>
</refname>
<refpurpose>
- Create a secondary <productname>Postgres</productname> database storage area
+ Create a secondary <productname>PostgreSQL</productname> database storage area
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
- <date>1999-07-20</date>
+ <date>2000-01-17</date>
</refsynopsisdivinfo>
<synopsis>
-initlocation [ --location=<replaceable class="parameter">er">al</replaceable>ble> | -D <replaceable class="parameter">altdir</replaceable> ]
- [ --username=<replaceable class="parameter">name</replaceable> | -u <replaceable class="parameter">name</replaceable> ]
- [ <replaceable class="parameter">altdir</replaceable> ]
+initlocation <replaceable class="parameter">directory</replaceable>
</synopsis>
<refsect2 id="R2-APP-INITLOCATION-1">
@@ -39,45 +37,14 @@ initlocation [ --location=<replaceable class="parameter">er">al</replaceable>ble
<variablelist>
<varlistentry>
- <term>--location=<replaceable class="parameter">altdir</replaceable></term>
- <term>-D <replaceable class="parameter">altdir</replaceable></term>
- <term><replaceable class="parameter">altdir</replaceable></term>
+ <term><replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
Where in your Unix filesystem do you want alternate databases to go?
- The top level directory is called the <envar>PGDATA</envar> directory, so you
- might want to point your first alternate location at
- <envar>PGDATA2</envar>.
</para>
</listitem>
</varlistentry>
- <varlistentry>
- <term>--username=<replaceable class="parameter">name</replaceable></term>
- <term>-u <replaceable class="parameter">name</replaceable></term>
- <term><envar>PGUSER</envar></term>
- <listitem>
- <para>
- Who will be the Unix filesystem owner of this database storage area?
- The
- <productname>Postgres</productname> superuser is a Unix user
- who owns all files that store the database
- system and also owns the postmaster and backend processes that access them.
- Usually, this is the user who should run <application>initlocation</application>
- and who will thus have ownership of the directories and files.
- </para>
- <note>
- <para>
- Only the Unix superuser can create a database system with a
- different user as the <productname>Postgres</productname> superuser.
- Specifying a user other than the <productname>Postgres</productname> superuser
- may lead to database security and data integrity problems. Refer to the
- <citetitle><productname>PostgreSQL</productname> Administrator's Guide</citetitle>
- for more information.
- </para>
- </note>
- </listitem>
- </varlistentry>
</variablelist>
</para>
</refsect2>
@@ -92,65 +59,6 @@ initlocation [ --location=<replaceable class="parameter">er">al</replaceable>ble
<para>
<application>initlocation</application> will create directories in
the specified place.
-
- <variablelist>
- <varlistentry>
- <term><computeroutput>
-We are initializing the database area with username postgres (uid=500).
-This user will own all the files and must also own the server process.
-Creating Postgres database system directory <replaceable class="parameter">altdir</replaceable>
-Creating Postgres database system directory <replaceable class="parameter">altdir</replaceable>
- </computeroutput></term>
- <listitem>
- <para>
- Successful completion.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><computeroutput>
-We are initializing the database area with username postgres (uid=500).
-This user will own all the files and must also own the server process.
-Creating Postgres database system directory /usr/local/src/testlocation
-mkdir: cannot make directory `<replaceable class="parameter">altdir</replaceable>': Permission denied
- </computeroutput></term>
- <listitem>
- <para>
- You do not have filesystem permission to write to the specified directory area.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><computeroutput>
-Valid username not given. You must specify the username for
-the Postgres superuser for the database system you are
-initializing, either with the --username option or by default
-to the USER environment variable.
- </computeroutput></term>
- <listitem>
- <para>
- The username which you have specified is not the
- <productname>Postgres</productname> superuser.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><computeroutput>
-Can't tell what username to use. You don't have the USER
-environment variable set to your username and didn't specify the
---username option
- </computeroutput></term>
- <listitem>
- <para>
- Specify the <option>--username</option> command line option.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
</para>
</refsect2>
</refsynopsisdiv>
@@ -164,41 +72,16 @@ environment variable set to your username and didn't specify the
</title>
<para>
<application>initlocation</application>
- creates a new <productname>Postgres</productname> secondary database storage area.
- A secondary storage area contains a required tree of directories with
- the correct file permissions on those directories.
- </para>
- <para>
- Creating a database storage area consists of creating the directories in which
- database data might live.
+ creates a new <productname>PostgreSQL</productname> secondary database storage area.
+ See the discussion under <xref linkend="SQL-CREATEDATABASE" endterm="SQL-CREATEDATABASE-title">
+ about how to manage and use secondary storage areas. If the argument does not contain
+ a slash and is not valid as a path, it is assumed to be an environment variable,
+ which is referenced. See the examples at the end.
</para>
<para>
- There are two kinds of arguments for <application>initlocation</application>.
-
- First, you can specify an environment variable (e.g. <envar>PGDATA2</envar>).
- This environment variable should be known to the backend for later use in
- <command>CREATE DATABASE/WITH LOCATION</command>
- or
- <command>createdb -D <replaceable class="parameter">altdir</replaceable></command>.
- However, <emphasis>the backend daemon must have this variable in it's
- environment</emphasis> for this to succeed.
-
- Second, you may be able to specify an explicit
- absolute path to the top directory of the storage area. However,this second
- option is possible only if explicitly enabled during the
- <productname>Postgres</productname> installation. It is usually disabled
- to alleviate security and data integrity concerns.
+ In order to use this command you must be logged in (using 'su', for example)
+ the database superuser.
</para>
- <note>
- <para>
- <productname>Postgres</productname> will add <filename>/base/</filename>
- to the specified path to create the storage area.
- </para>
- <para>
- The backend requires that any argument to <option>WITH LOCATION</option> which is
- in all uppercase and which has no path delimiters is an environment variable.
- </para>
- </note>
</refsect1>
<refsect1 id="R1-APP-INITLOCATION-2">
@@ -210,12 +93,19 @@ environment variable set to your username and didn't specify the
</title>
<para>
To create a database in an alternate location, using an environment variable:
+<programlisting>
+$ export PGDATA2=/opt/postgres/data
+$ initlocation PGDATA2
+$ createdb 'testdb' -D 'PGDATA2/testdb'
+</programlisting>
+ </para>
- <programlisting>
-% setenv PGDATA2 /opt/postgres/data
-% initlocation PGDATA2
-% createdb -D PGDATA2
- </programlisting>
+ <para>
+ Alternatively, if you allow absolute paths you could write:
+<programlisting>
+$ initlocation /opt/postgres/data
+$ createdb 'testdb' -D '/opt/postgres/data/testdb'
+</programlisting>
</para>
</refsect1>
</refentry>
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index a11a366b435..d8f6bb6b57e 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.12 1999/07/22 15:09:13 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.13 2000/01/18 00:03:34 petere Exp $
Postgres documentation
-->
@@ -25,9 +25,9 @@ Postgres documentation
<synopsis>
pg_dump [ <replaceable class="parameter">dbname</replaceable> ]
pg_dump [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ]
- [ -t <replaceable class="parameter">table</replaceable> ] [ -f <replaceable class="parameter">outputfile</replaceable> ]
+ [ -t <replaceable class="parameter">table</replaceable> ]
[ -a ] [ -c ] [ -d ] [ -D ] [ -n ] [ -N ]
- [ -o ] [ -s ] [ -u ] [ -v ] [ -x ]
+ [ -O ] [ -s ] [ -u ] [ -v ] [ -x ]
[ <replaceable class="parameter">dbname</replaceable> ]
</synopsis>
@@ -93,15 +93,6 @@ pg_dump [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceab
</varlistentry>
<varlistentry>
- <term>-f <replaceable class="parameter">filename</replaceable></term>
- <listitem>
- <para>
- Specifies the output file. Defaults to <filename>stdout</filename>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term>-n</term>
<listitem>
<para>
@@ -124,7 +115,7 @@ pg_dump [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceab
</varlistentry>
<varlistentry>
- <term>-o</term>
+ <term>-O</term>
<listitem>
<para>
Dump object identifiers (<acronym>OID</acronym>s) for every table.
diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml
index b604ed6c55b..cfe3b62f7f3 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.5 1999/07/22 15:09:13 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.6 2000/01/18 00:03:34 petere Exp $
Postgres documentation
-->
@@ -24,7 +24,7 @@ Postgres documentation
</refsynopsisdivinfo>
<synopsis>
pg_dumpall
-pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -a ] [ -d ] [ -D ] [ -o ] [ -s ] [ -u ] [ -v ] [ -x ]
+pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -a ] [ -d ] [ -D ] [ -O ] [ -s ] [ -u ] [ -v ] [ -x ]
</synopsis>
<refsect2 id="R2-APP-PG-DUMPALL-1">
@@ -77,7 +77,7 @@ pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replac
</varlistentry>
<varlistentry>
- <term>-o</term>
+ <term>-O</term>
<listitem>
<para>
Dump object identifiers (<acronym>OID</acronym>s) for every table.
@@ -277,7 +277,7 @@ dumpSequence(<replaceable class="parameter">table</replaceable>): SELECT failed
To dump all databases:
<programlisting>
-% pg_dumpall -o > db.out
+% pg_dumpall > db.out
</programlisting>
<tip>