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

Commite90b841

Browse files
committed
More cleanup of Diagnostics sections.
1 parentfbb39c0 commite90b841

29 files changed

+344
-769
lines changed

‎doc/src/sgml/ref/alter_group.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_group.sgml,v 1.12 2003/09/09 18:28:52 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_group.sgml,v 1.13 2003/09/12 00:12:47 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -45,7 +45,7 @@ ALTER GROUP <replaceable class="PARAMETER">groupname</replaceable> RENAME TO <re
4545
</refsect1>
4646

4747
<refsect1>
48-
<title>Parameter</title>
48+
<title>Parameters</title>
4949

5050
<variablelist>
5151
<varlistentry>

‎doc/src/sgml/ref/alter_language.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_language.sgml,v 1.3 2003/09/09 18:28:52 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_language.sgml,v 1.4 2003/09/12 00:12:47 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -35,7 +35,7 @@ ALTER LANGUAGE <replaceable>name</replaceable> RENAME TO <replaceable>newname</r
3535
</refsect1>
3636

3737
<refsect1>
38-
<title>Parameter</title>
38+
<title>Parameters</title>
3939

4040
<variablelist>
4141
<varlistentry>

‎doc/src/sgml/ref/alter_schema.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_schema.sgml,v 1.3 2003/09/09 18:28:52 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_schema.sgml,v 1.4 2003/09/12 00:12:47 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -36,7 +36,7 @@ ALTER SCHEMA <replaceable>name</replaceable> RENAME TO <replaceable>newname</rep
3636
</refsect1>
3737

3838
<refsect1>
39-
<title>Parameter</title>
39+
<title>Parameters</title>
4040

4141
<variablelist>
4242
<varlistentry>

‎doc/src/sgml/ref/cluster.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/cluster.sgml,v 1.28 2003/09/09 18:28:52 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/cluster.sgml,v 1.29 2003/09/12 00:12:47 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -74,7 +74,7 @@ CLUSTER
7474
</refsect1>
7575

7676
<refsect1>
77-
<title>Parameter</title>
77+
<title>Parameters</title>
7878

7979
<variablelist>
8080
<varlistentry>

‎doc/src/sgml/ref/clusterdb.sgml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/clusterdb.sgml,v 1.13 2003/09/09 18:28:52 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/clusterdb.sgml,v 1.14 2003/09/12 00:12:47 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -48,16 +48,17 @@ PostgreSQL documentation
4848
<application>clusterdb</application> is a wrapper around the SQL
4949
command <xref linkend="SQL-CLUSTER" endterm="sql-cluster-title">.
5050
There is no effective difference between clustering databases via
51-
this or other methods. The database server must be running at the
52-
targeted host. Also, any default settings and environment
53-
variables used by the <application>libpq</application> front-end
54-
library will apply.
51+
this utility and via other methods for accessing the server.
5552
</para>
5653

5754
<para>
5855
In case of difficulty, see <xref linkend="SQL-CLUSTER"
5956
endterm="sql-cluster-title"> and <xref linkend="APP-PSQL"> for
6057
discussions of potential problems and error messages.
58+
The database server must be running at the
59+
targeted host. Also, any default connection settings and environment
60+
variables used by the <application>libpq</application> front-end
61+
library will apply.
6162
</para>
6263

6364
</refsect1>

‎doc/src/sgml/ref/commit.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/commit.sgml,v 1.17 2003/09/09 18:28:52 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/commit.sgml,v 1.18 2003/09/12 00:12:47 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -12,8 +12,8 @@ PostgreSQL documentation
1212
<refnamediv>
1313
<refname>COMMIT</refname>
1414
<refpurpose>commit the current transaction</refpurpose>
15-
</refnamediv>
16-
15+
</refnamediv>
16+
1717
<indexterm zone="sql-commit">
1818
<primary>COMMIT</primary>
1919
</indexterm>
@@ -74,7 +74,7 @@ COMMIT;
7474
</programlisting>
7575
</para>
7676
</refsect1>
77-
77+
7878
<refsect1>
7979
<title>Compatibility</title>
8080

‎doc/src/sgml/ref/create_database.sgml

Lines changed: 24 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.35 2003/08/31 17:32:22 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.36 2003/09/12 00:12:47 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -36,6 +36,12 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable>
3636
<productname>PostgreSQL</productname> database.
3737
</para>
3838

39+
<para>
40+
To create a database, you must be a superuser or have the special
41+
<literal>CREATEDB</> privilege.
42+
See <xref linkend="SQL-CREATEUSER" endterm="SQL-CREATEUSER-title">.
43+
</para>
44+
3945
<para>
4046
Normally, the creator becomes the owner of the new database.
4147
Superusers can create databases owned by other users using the
@@ -63,6 +69,8 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable>
6369
a leading slash
6470
(e.g., <filename>/usr/local/pgsql/data</filename>),
6571
are allowed as well.
72+
In either case, the final path name must be absolute and must not
73+
contain any single quotes.
6674
</para>
6775

6876
<para>
@@ -86,7 +94,7 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable>
8694
</refsect1>
8795

8896
<refsect1>
89-
<title>Parameter</title>
97+
<title>Parameters</title>
9098

9199
<variablelist>
92100
<varlistentry>
@@ -147,78 +155,20 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable>
147155
</refsect1>
148156

149157
<refsect1>
150-
<title>Diagnostics</title>
151-
152-
<variablelist>
153-
<varlistentry>
154-
<term><computeroutput>CREATE DATABASE</computeroutput></term>
155-
<listitem>
156-
<para>
157-
Message returned if the database was successfully created.
158-
</para>
159-
</listitem>
160-
</varlistentry>
161-
162-
<varlistentry>
163-
<term><computeroutput>ERROR: user '<replaceable class="parameter">username</replaceable>' is not allowed to create/drop databases</computeroutput></term>
164-
<listitem>
165-
<para>
166-
You must have the special <literal>CREATEDB</> privilege to create databases.
167-
See <xref linkend="SQL-CREATEUSER" endterm="SQL-CREATEUSER-title">.
168-
</para>
169-
</listitem>
170-
</varlistentry>
171-
172-
173-
<varlistentry>
174-
<term><computeroutput>ERROR: createdb: database "<replaceable class="parameter">name</replaceable>" already exists</computeroutput></term>
175-
<listitem>
176-
<para>
177-
This occurs if a database with the specified name already
178-
exists.
179-
</para>
180-
</listitem>
181-
</varlistentry>
182-
183-
<varlistentry>
184-
<term><computeroutput>ERROR: database path may not contain single quotes</computeroutput></term>
185-
<listitem>
186-
<para>
187-
The database location
188-
<replaceable class="parameter">dbpath</replaceable> cannot contain
189-
single quotes. This is required so that the shell commands that
190-
create the database directory can execute safely.
191-
</para>
192-
</listitem>
193-
</varlistentry>
194-
195-
<varlistentry>
196-
<term><computeroutput>ERROR: CREATE DATABASE: may not be called in a transaction block</computeroutput></term>
197-
<listitem>
198-
<para>
199-
If you have an explicit transaction block in progress you cannot call
200-
<command>CREATE DATABASE</command>. You must finish the transaction first.
201-
</para>
202-
</listitem>
203-
</varlistentry>
204-
205-
<varlistentry>
206-
<term><computeroutput>ERROR: Unable to create database directory '<replaceable>path</replaceable>'.</computeroutput></term>
207-
<term><computeroutput>ERROR: Could not initialize database directory.</computeroutput></term>
208-
<listitem>
209-
<para>
210-
These are most likely related to insufficient permissions on the data
211-
directory, a full disk, or other file system problems. The user under
212-
which the database server is running must have access to the location.
213-
</para>
214-
</listitem>
215-
</varlistentry>
158+
<title>Notes</title>
216159

217-
</variablelist>
218-
</refsect1>
160+
<para>
161+
<command>CREATE DATABASE</> cannot be executed inside a transaction
162+
block.
163+
</para>
219164

220-
<refsect1>
221-
<title>Notes</title>
165+
<para>
166+
Errors along the line of <quote>could not initialize database directory</>
167+
are most likely related to insufficient permissions on the data
168+
directory, a full disk, or other file system problems. When using an
169+
alternate location, the user under
170+
which the database server is running must have access to the location.
171+
</para>
222172

223173
<para>
224174
Use <xref linkend="SQL-DROPDATABASE" endterm="SQL-DROPDATABASE-title"> to remove a database.
@@ -231,7 +181,8 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable>
231181

232182
<para>
233183
There are security issues involved with using alternate database
234-
locations specified with absolute path names. See <xref
184+
locations specified with absolute path names; this is why the feature
185+
is not enabled by default. See <xref
235186
linkend="manage-ag-alternate-locs"> for more information.
236187
</para>
237188

‎doc/src/sgml/ref/create_sequence.sgml

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_sequence.sgml,v 1.34 2003/08/31 17:32:22 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_sequence.sgml,v 1.35 2003/09/12 00:12:47 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -196,49 +196,6 @@ SELECT * FROM <replaceable>seqname</replaceable>;
196196
</variablelist>
197197
</refsect1>
198198

199-
<refsect1>
200-
<title>Diagnostics</title>
201-
202-
<variablelist>
203-
<varlistentry>
204-
<term><computeroutput>CREATE SEQUENCE</computeroutput></term>
205-
<listitem>
206-
<para>
207-
Message returned if the sequence was successfully created.
208-
</para>
209-
</listitem>
210-
</varlistentry>
211-
212-
<varlistentry>
213-
<term><computeroutput>ERROR: Relation '<replaceable class="parameter">seqname</replaceable>' already exists</computeroutput></term>
214-
<listitem>
215-
<para>
216-
A sequence, table, view, or index of the specified name already exists.
217-
</para>
218-
</listitem>
219-
</varlistentry>
220-
221-
<varlistentry>
222-
<term><computeroutput>ERROR: DefineSequence: MINVALUE (<replaceable class="parameter">start</replaceable>) can't be >= MAXVALUE (<replaceable class="parameter">max</replaceable>)</computeroutput></term>
223-
<term><computeroutput>ERROR: DefineSequence: START value (<replaceable class="parameter">start</replaceable>) can't be < MINVALUE (<replaceable class="parameter">min</replaceable>)</computeroutput></term>
224-
<listitem>
225-
<para>
226-
The specified starting value is out of range.
227-
</para>
228-
</listitem>
229-
</varlistentry>
230-
231-
<varlistentry>
232-
<term><computeroutput>ERROR: DefineSequence: MINVALUE (<replaceable class="parameter">min</replaceable>) can't be >= MAXVALUE (<replaceable class="parameter">max</replaceable>)</computeroutput></term>
233-
<listitem>
234-
<para>
235-
The minimum and maximum values are inconsistent.
236-
</para>
237-
</listitem>
238-
</varlistentry>
239-
</variablelist>
240-
</refsect1>
241-
242199
<refsect1>
243200
<title>Notes</title>
244201

‎doc/src/sgml/ref/create_view.sgml

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_view.sgml,v 1.23 2003/08/31 17:32:22 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_view.sgml,v 1.24 2003/09/12 00:12:47 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -90,39 +90,6 @@ class="PARAMETER">column_name</replaceable> [, ...] ) ] AS <replaceable class="P
9090
</variablelist>
9191
</refsect1>
9292

93-
<refsect1>
94-
<title>Diagnostics</title>
95-
96-
<variablelist>
97-
<varlistentry>
98-
<term><computeroutput>CREATE VIEW</computeroutput></term>
99-
<listitem>
100-
<para>
101-
Message returned if the view was successfully created.
102-
</para>
103-
</listitem>
104-
</varlistentry>
105-
106-
<varlistentry>
107-
<term><computeroutput>WARNING: Attribute '<replaceable class="parameter">column</replaceable>' has an unknown type</computeroutput></term>
108-
<listitem>
109-
<para>
110-
The view will be created having a column with an unknown type if
111-
you do not specify it. For example, the following command gives
112-
this warning:
113-
<programlisting>
114-
CREATE VIEW vista AS SELECT 'Hello World'
115-
</programlisting>
116-
whereas this command does not:
117-
<programlisting>
118-
CREATE VIEW vista AS SELECT text 'Hello World'
119-
</programlisting>
120-
</para>
121-
</listitem>
122-
</varlistentry>
123-
</variablelist>
124-
</refsect1>
125-
12693
<refsect1>
12794
<title>Notes</title>
12895

@@ -137,6 +104,20 @@ CREATE VIEW vista AS SELECT text 'Hello World'
137104
<para>
138105
Use the <command>DROP VIEW</command> statement to drop views.
139106
</para>
107+
108+
<para>
109+
Be careful that the names and types of the view's columns will be
110+
assigned the way you want. For example,
111+
<programlisting>
112+
CREATE VIEW vista AS SELECT 'Hello World';
113+
</programlisting>
114+
is bad form in two ways: the column name defaults to <literal>?column?</>,
115+
and the column datatype defaults to <type>unknown</>. If you want a
116+
string literal in a view's result, use something like
117+
<programlisting>
118+
CREATE VIEW vista AS SELECT text 'Hello World' AS hello;
119+
</programlisting>
120+
</para>
140121
</refsect1>
141122

142123
<refsect1>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp