Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit28125ed

Browse files
committed
Updated user interfaces on initdb, initlocation, pg_dump, ipcclean to a GNU-compliant'ish state.
Made ipcclean work on Linux.
1 parent9e0b463 commit28125ed

File tree

8 files changed

+351
-314
lines changed

8 files changed

+351
-314
lines changed

‎doc/src/sgml/ref/initdb.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.7 2000/01/15 18:30:27 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.8 2000/01/18 00:03:34 petere Exp $
33
Postgres documentation
44
-->
55

@@ -26,7 +26,7 @@ Postgres documentation
2626
initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ]
2727
[ --sysid|-i <replaceable class="parameter">sysid</replaceable> ]
2828
[ --pwprompt|-W ]
29-
[ --encoding|-e <replaceable class="parameter">encoding</replaceable> ]
29+
[ --encoding|-E <replaceable class="parameter">encoding</replaceable> ]
3030
[ --pglib|-L <replaceable class="parameter">libdir</replaceable> ]
3131
[ --username|-u <replaceable class="parameter">name</replaceable> ]
3232
[ --noclean | -n ] [ --debug | -d ] [ --template | -t ]
@@ -85,7 +85,7 @@ initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ]
8585

8686
<varlistentry>
8787
<term>--encoding=<replaceable class="parameter">encoding</replaceable></term>
88-
<term>-e <replaceable class="parameter">encoding</replaceable></term>
88+
<term>-E <replaceable class="parameter">encoding</replaceable></term>
8989
<listitem>
9090
<para>
9191
Selects the multibyte encoding of the template database. This will also

‎doc/src/sgml/ref/initlocation.sgml

Lines changed: 24 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.4 1999/07/22 15:09:12 thomas Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.5 2000/01/18 00:03:34 petere Exp $
33
Postgres documentation
44
-->
55

@@ -15,17 +15,15 @@ Postgres documentation
1515
<application>initlocation</application>
1616
</refname>
1717
<refpurpose>
18-
Create a secondary <productname>Postgres</productname> database storage area
18+
Create a secondary <productname>PostgreSQL</productname> database storage area
1919
</refpurpose>
2020
</refnamediv>
2121
<refsynopsisdiv>
2222
<refsynopsisdivinfo>
23-
<date>1999-07-20</date>
23+
<date>2000-01-17</date>
2424
</refsynopsisdivinfo>
2525
<synopsis>
26-
initlocation [ --location=<replaceable class="parameter">er">al</replaceable>ble> | -D <replaceable class="parameter">altdir</replaceable> ]
27-
[ --username=<replaceable class="parameter">name</replaceable> | -u <replaceable class="parameter">name</replaceable> ]
28-
[ <replaceable class="parameter">altdir</replaceable> ]
26+
initlocation <replaceable class="parameter">directory</replaceable>
2927
</synopsis>
3028

3129
<refsect2 id="R2-APP-INITLOCATION-1">
@@ -39,45 +37,14 @@ initlocation [ --location=<replaceable class="parameter">er">al</replaceable>ble
3937

4038
<variablelist>
4139
<varlistentry>
42-
<term>--location=<replaceable class="parameter">altdir</replaceable></term>
43-
<term>-D <replaceable class="parameter">altdir</replaceable></term>
44-
<term><replaceable class="parameter">altdir</replaceable></term>
40+
<term><replaceable class="parameter">directory</replaceable></term>
4541
<listitem>
4642
<para>
4743
Where in your Unix filesystem do you want alternate databases to go?
48-
The top level directory is called the <envar>PGDATA</envar> directory, so you
49-
might want to point your first alternate location at
50-
<envar>PGDATA2</envar>.
5144
</para>
5245
</listitem>
5346
</varlistentry>
5447

55-
<varlistentry>
56-
<term>--username=<replaceable class="parameter">name</replaceable></term>
57-
<term>-u <replaceable class="parameter">name</replaceable></term>
58-
<term><envar>PGUSER</envar></term>
59-
<listitem>
60-
<para>
61-
Who will be the Unix filesystem owner of this database storage area?
62-
The
63-
<productname>Postgres</productname> superuser is a Unix user
64-
who owns all files that store the database
65-
system and also owns the postmaster and backend processes that access them.
66-
Usually, this is the user who should run <application>initlocation</application>
67-
and who will thus have ownership of the directories and files.
68-
</para>
69-
<note>
70-
<para>
71-
Only the Unix superuser can create a database system with a
72-
different user as the <productname>Postgres</productname> superuser.
73-
Specifying a user other than the <productname>Postgres</productname> superuser
74-
may lead to database security and data integrity problems. Refer to the
75-
<citetitle><productname>PostgreSQL</productname> Administrator's Guide</citetitle>
76-
for more information.
77-
</para>
78-
</note>
79-
</listitem>
80-
</varlistentry>
8148
</variablelist>
8249
</para>
8350
</refsect2>
@@ -92,65 +59,6 @@ initlocation [ --location=<replaceable class="parameter">er">al</replaceable>ble
9259
<para>
9360
<application>initlocation</application> will create directories in
9461
the specified place.
95-
96-
<variablelist>
97-
<varlistentry>
98-
<term><computeroutput>
99-
We are initializing the database area with username postgres (uid=500).
100-
This user will own all the files and must also own the server process.
101-
Creating Postgres database system directory <replaceable class="parameter">altdir</replaceable>
102-
Creating Postgres database system directory <replaceable class="parameter">altdir</replaceable>
103-
</computeroutput></term>
104-
<listitem>
105-
<para>
106-
Successful completion.
107-
</para>
108-
</listitem>
109-
</varlistentry>
110-
111-
<varlistentry>
112-
<term><computeroutput>
113-
We are initializing the database area with username postgres (uid=500).
114-
This user will own all the files and must also own the server process.
115-
Creating Postgres database system directory /usr/local/src/testlocation
116-
mkdir: cannot make directory `<replaceable class="parameter">altdir</replaceable>': Permission denied
117-
</computeroutput></term>
118-
<listitem>
119-
<para>
120-
You do not have filesystem permission to write to the specified directory area.
121-
</para>
122-
</listitem>
123-
</varlistentry>
124-
125-
<varlistentry>
126-
<term><computeroutput>
127-
Valid username not given. You must specify the username for
128-
the Postgres superuser for the database system you are
129-
initializing, either with the --username option or by default
130-
to the USER environment variable.
131-
</computeroutput></term>
132-
<listitem>
133-
<para>
134-
The username which you have specified is not the
135-
<productname>Postgres</productname> superuser.
136-
</para>
137-
</listitem>
138-
</varlistentry>
139-
140-
<varlistentry>
141-
<term><computeroutput>
142-
Can't tell what username to use. You don't have the USER
143-
environment variable set to your username and didn't specify the
144-
--username option
145-
</computeroutput></term>
146-
<listitem>
147-
<para>
148-
Specify the <option>--username</option> command line option.
149-
</para>
150-
</listitem>
151-
</varlistentry>
152-
153-
</variablelist>
15462
</para>
15563
</refsect2>
15664
</refsynopsisdiv>
@@ -164,41 +72,16 @@ environment variable set to your username and didn't specify the
16472
</title>
16573
<para>
16674
<application>initlocation</application>
167-
creates a new <productname>Postgres</productname> secondary database storage area.
168-
A secondary storage area contains a required tree of directories with
169-
the correct file permissions on those directories.
170-
</para>
171-
<para>
172-
Creating a database storage area consists of creating the directories in which
173-
database data might live.
75+
creates a new <productname>PostgreSQL</productname> secondary database storage area.
76+
See the discussion under <xref linkend="SQL-CREATEDATABASE" endterm="SQL-CREATEDATABASE-title">
77+
about how to manage and use secondary storage areas. If the argument does not contain
78+
a slash and is not valid as a path, it is assumed to be an environment variable,
79+
which is referenced. See the examples at the end.
17480
</para>
17581
<para>
176-
There are two kinds of arguments for <application>initlocation</application>.
177-
178-
First, you can specify an environment variable (e.g. <envar>PGDATA2</envar>).
179-
This environment variable should be known to the backend for later use in
180-
<command>CREATE DATABASE/WITH LOCATION</command>
181-
or
182-
<command>createdb -D <replaceable class="parameter">altdir</replaceable></command>.
183-
However, <emphasis>the backend daemon must have this variable in it's
184-
environment</emphasis> for this to succeed.
185-
186-
Second, you may be able to specify an explicit
187-
absolute path to the top directory of the storage area. However,this second
188-
option is possible only if explicitly enabled during the
189-
<productname>Postgres</productname> installation. It is usually disabled
190-
to alleviate security and data integrity concerns.
82+
In order to use this command you must be logged in (using 'su', for example)
83+
the database superuser.
19184
</para>
192-
<note>
193-
<para>
194-
<productname>Postgres</productname> will add <filename>/base/</filename>
195-
to the specified path to create the storage area.
196-
</para>
197-
<para>
198-
The backend requires that any argument to <option>WITH LOCATION</option> which is
199-
in all uppercase and which has no path delimiters is an environment variable.
200-
</para>
201-
</note>
20285
</refsect1>
20386

20487
<refsect1 id="R1-APP-INITLOCATION-2">
@@ -210,12 +93,19 @@ environment variable set to your username and didn't specify the
21093
</title>
21194
<para>
21295
To create a database in an alternate location, using an environment variable:
96+
<programlisting>
97+
$ export PGDATA2=/opt/postgres/data
98+
$ initlocation PGDATA2
99+
$ createdb 'testdb' -D 'PGDATA2/testdb'
100+
</programlisting>
101+
</para>
213102

214-
<programlisting>
215-
% setenv PGDATA2 /opt/postgres/data
216-
% initlocation PGDATA2
217-
% createdb -D PGDATA2
218-
</programlisting>
103+
<para>
104+
Alternatively, if you allow absolute paths you could write:
105+
<programlisting>
106+
$ initlocation /opt/postgres/data
107+
$ createdb 'testdb' -D '/opt/postgres/data/testdb'
108+
</programlisting>
219109
</para>
220110
</refsect1>
221111
</refentry>

‎doc/src/sgml/ref/pg_dump.sgml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.12 1999/07/22 15:09:13 thomas Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.13 2000/01/18 00:03:34 petere Exp $
33
Postgres documentation
44
-->
55

@@ -25,9 +25,9 @@ Postgres documentation
2525
<synopsis>
2626
pg_dump [ <replaceable class="parameter">dbname</replaceable> ]
2727
pg_dump [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ]
28-
[ -t <replaceable class="parameter">table</replaceable> ] [ -f <replaceable class="parameter">outputfile</replaceable> ]
28+
[ -t <replaceable class="parameter">table</replaceable> ]
2929
[ -a ] [ -c ] [ -d ] [ -D ] [ -n ] [ -N ]
30-
[ -o ] [ -s ] [ -u ] [ -v ] [ -x ]
30+
[ -O ] [ -s ] [ -u ] [ -v ] [ -x ]
3131
[ <replaceable class="parameter">dbname</replaceable> ]
3232
</synopsis>
3333

@@ -92,15 +92,6 @@ pg_dump [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceab
9292
</listitem>
9393
</varlistentry>
9494

95-
<varlistentry>
96-
<term>-f <replaceable class="parameter">filename</replaceable></term>
97-
<listitem>
98-
<para>
99-
Specifies the output file. Defaults to <filename>stdout</filename>.
100-
</para>
101-
</listitem>
102-
</varlistentry>
103-
10495
<varlistentry>
10596
<term>-n</term>
10697
<listitem>
@@ -124,7 +115,7 @@ pg_dump [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceab
124115
</varlistentry>
125116

126117
<varlistentry>
127-
<term>-o</term>
118+
<term>-O</term>
128119
<listitem>
129120
<para>
130121
Dump object identifiers (<acronym>OID</acronym>s) for every table.

‎doc/src/sgml/ref/pg_dumpall.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.5 1999/07/22 15:09:13 thomas Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.6 2000/01/18 00:03:34 petere Exp $
33
Postgres documentation
44
-->
55

@@ -24,7 +24,7 @@ Postgres documentation
2424
</refsynopsisdivinfo>
2525
<synopsis>
2626
pg_dumpall
27-
pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -a ] [ -d ] [ -D ] [ -o ] [ -s ] [ -u ] [ -v ] [ -x ]
27+
pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -a ] [ -d ] [ -D ] [ -O ] [ -s ] [ -u ] [ -v ] [ -x ]
2828
</synopsis>
2929

3030
<refsect2 id="R2-APP-PG-DUMPALL-1">
@@ -77,7 +77,7 @@ pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replac
7777
</varlistentry>
7878

7979
<varlistentry>
80-
<term>-o</term>
80+
<term>-O</term>
8181
<listitem>
8282
<para>
8383
Dump object identifiers (<acronym>OID</acronym>s) for every table.
@@ -277,7 +277,7 @@ dumpSequence(<replaceable class="parameter">table</replaceable>): SELECT failed
277277
To dump all databases:
278278

279279
<programlisting>
280-
% pg_dumpall-o> db.out
280+
% pg_dumpall > db.out
281281
</programlisting>
282282

283283
<tip>

‎src/bin/initdb/initdb.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#
2727
#
2828
# IDENTIFICATION
29-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.79 2000/01/15 18:30:31 petere Exp $
29+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.80 2000/01/18 00:03:35 petere Exp $
3030
#
3131
#-------------------------------------------------------------------------
3232

@@ -199,14 +199,14 @@ do
199199
;;
200200
# The encoding of the template1 database. Defaults to what you chose
201201
# at configure time. (see above)
202-
--encoding|-e)
202+
--encoding|-E)
203203
MULTIBYTE="$2"
204204
shift;;
205205
--encoding=*)
206206
MULTIBYTE=`echo$1| sed's/^--encoding=//'`
207207
;;
208-
-e*)
209-
MULTIBYTE=`echo$1| sed's/^-e//'`
208+
-E*)
209+
MULTIBYTE=`echo$1| sed's/^-E//'`
210210
;;
211211
*)
212212
PGDATA=$1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp