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

Commitd2a907c

Browse files
author
Thomas G. Lockhart
committed
Markup and editing adjustments...
1 parent5a68fd5 commitd2a907c

18 files changed

+960
-858
lines changed

‎doc/src/sgml/ref/alter_table.sgml

Lines changed: 23 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Modifies table properties
1818
</REFSYNOPSISDIVINFO>
1919
<SYNOPSIS>
2020
ALTER TABLE <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
21-
[*] ADD [COLUMN] <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE> <REPLACEABLE CLASS="PARAMETER">type</REPLACEABLE>
21+
[ *] ADD [COLUMN] <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE> <REPLACEABLE CLASS="PARAMETER">type</REPLACEABLE>
2222
ALTER TABLE <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
23-
[*] RENAME [COLUMN] <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE> TO <REPLACEABLE CLASS="PARAMETER">newcolumn</REPLACEABLE>
23+
[ *] RENAME [COLUMN] <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE> TO <REPLACEABLE CLASS="PARAMETER">newcolumn</REPLACEABLE>
2424
ALTER TABLE <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
2525
RENAME TO <REPLACEABLE CLASS="PARAMETER">newtable</REPLACEABLE>
2626
</SYNOPSIS>
@@ -103,14 +103,14 @@ Outputs
103103
<VARIABLELIST>
104104
<VARLISTENTRY>
105105
<TERM>
106-
<ReturnValue>status</ReturnValue>
106+
<replaceable>status</replaceable>
107107
</TERM>
108108
<LISTITEM>
109109
<PARA>
110110
<VARIABLELIST>
111111
<VARLISTENTRY>
112112
<TERM>
113-
<ReturnValue>ALTER</ReturnValue>
113+
<returnvalue>ALTER</returnvalue>
114114
</TERM>
115115
<LISTITEM>
116116
<PARA>
@@ -121,7 +121,7 @@ Outputs
121121

122122
<VARLISTENTRY>
123123
<TERM>
124-
<ReturnValue>NEW</ReturnValue>
124+
<returnvalue>NEW</returnvalue>
125125
</TERM>
126126
<LISTITEM>
127127
<PARA>
@@ -156,9 +156,9 @@ Outputs
156156
Description
157157
</TITLE>
158158
<PARA>
159-
ALTER TABLE changes the definition of an existing table.
159+
<command>ALTER TABLE</command> changes the definition of an existing table.
160160
The new columns and their types are specified in the same style
161-
and with the the same restrictions as in CREATE TABLE.
161+
and with the the same restrictions as in<command>CREATE TABLE</command>.
162162
The RENAME clause causes the name of a table or column
163163
to change without changing any of the data contained in
164164
the affected table. Thus, the table or column will
@@ -178,18 +178,15 @@ Notes
178178
<PARA>
179179
The keyword COLUMN is noise and can be omitted.
180180

181-
<PARA>
182-
ALTER TABLE/RENAME is a PostgreSQL language extension.
183-
184181
<PARA>
185182
<Quote>[*]</Quote> following a name of a table indicates that statement
186183
should be run over that table and all tables below it in the
187184
inheritance hierarchy.
188-
Refer toPostgreSQL User's Guidefor further
185+
ThePostgreSQL User's Guidehas further
189186
information on inheritance.
190187

191188
<PARA>
192-
Refer totheCREATE TABLEreferencefor further description
189+
Refer to CREATE TABLE for a further description
193190
of valid arguments.
194191

195192
</REFSECT2>
@@ -232,23 +229,30 @@ Compatibility
232229
SQL92
233230
</TITLE>
234231
<PARA>
235-
SQL92 specifies some additional capabilities for ALTER TABLE
236-
statement which are not yet directly supported by <ProductName>Postgres</ProductName>:
232+
<command>ALTER TABLE/RENAME</command>
233+
is a <productname>Postgres</productname> language extension.
234+
235+
<PARA>
236+
SQL92 specifies some additional capabilities for <command>ALTER TABLE</command>
237+
statement which are not yet directly supported by
238+
<ProductName>Postgres</ProductName>:
237239

238240
<VARIABLELIST>
239241
<VARLISTENTRY>
240242
<TERM>
241243
<Synopsis>
242-
ALTER TABLE <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> ALTER [COLUMN] <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE>
244+
ALTER TABLE <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> ALTER [COLUMN] <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE>
243245
SET DEFAULT <REPLACEABLE CLASS="PARAMETER">default</REPLACEABLE>
244-
ALTER TABLE <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> ALTER [COLUMN] <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE>
245-
ADD [CONSTRAINT <REPLACEABLE CLASS="PARAMETER">constraint</REPLACEABLE>] <REPLACEABLE CLASS="PARAMETER">table-constraint</REPLACEABLE>
246+
247+
ALTER TABLE <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> ALTER [ COLUMN ] <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE>
248+
ADD [ CONSTRAINT <REPLACEABLE CLASS="PARAMETER">constraint</REPLACEABLE> ] <REPLACEABLE CLASS="PARAMETER">table-constraint</REPLACEABLE>
246249
</Synopsis>
247250
</TERM>
248251
<LISTITEM>
249252
<PARA>
250253
Puts the default value or constraint specified into the
251-
definition of column in the table. See CREATE TABLE for the
254+
definition of column in the table.
255+
See <command>CREATE TABLE</command> for the
252256
syntax of the default and table-constraint clauses.
253257
If a default clause already exists, it will be replaced by
254258
the new definition. If any constraints on this column already
@@ -307,7 +311,7 @@ DROP TABLE temp;
307311
<TERM>
308312
<Synopsis>
309313
ALTER TABLE <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
310-
DROP [COLUMN] <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE> { RESTRICT | CASCADE }
314+
DROP [COLUMN] <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE> { RESTRICT | CASCADE }
311315
</Synopsis>
312316
</TERM>
313317
<LISTITEM>
@@ -335,23 +339,3 @@ DROP TABLE temp;
335339
</PARA>
336340
</VARIABLELIST>
337341
</REFENTRY>
338-
339-
<!--
340-
<REPLACEABLE CLASS="PARAMETER">
341-
</REPLACEABLE>
342-
<ReturnValue></ReturnValue>
343-
<PARA>
344-
</PARA>
345-
<VARIABLELIST>
346-
<VARLISTENTRY>
347-
<TERM>&bull;
348-
</TERM>
349-
<LISTITEM>
350-
<PARA>
351-
</PARA>
352-
</LISTITEM>
353-
</VARLISTENTRY>
354-
</VARIABLELIST>
355-
<PARA>
356-
</PARA>
357-
-->

‎doc/src/sgml/ref/alter_user.sgml

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,26 @@
1414
</REFPURPOSE>
1515
<REFSYNOPSISDIV>
1616
<REFSYNOPSISDIVINFO>
17-
<DATE>1998-04-15</DATE>
17+
<DATE>1998-09-08</DATE>
1818
</REFSYNOPSISDIVINFO>
1919
<synopsis>
20-
ALTER USER <replaceable class="PARAMETER">username</replaceable>
21-
[WITH PASSWORD <replaceable class="PARAMETER">password</replaceable>]
22-
[CREATEDB | NOCREATEDB]
23-
[CREATEUSER | NOCREATEUSER]
24-
[IN GROUP <replaceable class="PARAMETER">groupname</replaceable> [, ...] ]
25-
[VALID UNTIL '<replaceable class="PARAMETER">abstime</replaceable>']
20+
ALTER USER <replaceable class="PARAMETER">username</replaceable>
21+
[WITH PASSWORD <replaceable class="PARAMETER">password</replaceable>]
22+
[CREATEDB | NOCREATEDB]
23+
[CREATEUSER | NOCREATEUSER]
24+
[IN GROUP <replaceable class="PARAMETER">groupname</replaceable> [, ...] ]
25+
[VALID UNTIL '<replaceable class="PARAMETER">abstime</replaceable>']
2626
</synopsis>
2727

2828
<REFSECT2 ID="R2-SQL-ALTERUSER-1">
2929
<REFSECT2INFO>
30-
<DATE>1998-04-15</DATE>
30+
<DATE>1998-09-08</DATE>
3131
</REFSECT2INFO>
3232
<TITLE>
3333
Inputs
3434
</TITLE>
3535
<PARA>
36-
Refer to CREATE USER statement for a detailed description of each
36+
Refer to<command>CREATE USER</command> for a detailed description of each
3737
clause.
3838
</para>
3939
<VARIABLELIST>
@@ -47,6 +47,7 @@
4747
</PARA>
4848
</LISTITEM>
4949
</VARLISTENTRY>
50+
5051
<VARLISTENTRY>
5152
<TERM>
5253
<REPLACEABLE CLASS="PARAMETER"> password </REPLACEABLE>
@@ -57,6 +58,7 @@
5758
</PARA>
5859
</LISTITEM>
5960
</VARLISTENTRY>
61+
6062
<VARLISTENTRY>
6163
<TERM>
6264
<REPLACEABLE CLASS="PARAMETER"> groupname </REPLACEABLE>
@@ -67,13 +69,15 @@
6769
</PARA>
6870
</LISTITEM>
6971
</VARLISTENTRY>
72+
7073
<VARLISTENTRY>
7174
<TERM>
7275
<REPLACEABLE CLASS="PARAMETER"> abstime </REPLACEABLE>
7376
</TERM>
7477
<LISTITEM>
7578
<PARA>
76-
The date (and, optionally, the time) at which this user's access is to be terminated.
79+
The date (and, optionally, the time)
80+
at which this user's access is to be terminated.
7781
</PARA>
7882
</LISTITEM>
7983
</VARLISTENTRY>
@@ -82,7 +86,7 @@
8286

8387
<REFSECT2 ID="R2-SQL-ALTERUSER-2">
8488
<REFSECT2INFO>
85-
<DATE>1998-04-15</DATE>
89+
<DATE>1998-09-08</DATE>
8690
</REFSECT2INFO>
8791
<TITLE>
8892
Outputs
@@ -92,14 +96,14 @@
9296
<VARIABLELIST>
9397
<VARLISTENTRY>
9498
<TERM>
95-
<ReturnValue>status</ReturnValue>
99+
<replaceable>status</replaceable>
96100
</TERM>
97101
<LISTITEM>
98102
<PARA>
99103
<VARIABLELIST>
100104
<VARLISTENTRY>
101105
<TERM>
102-
<ReturnValue>ALTER USER</ReturnValue>
106+
<returnvalue>ALTER USER</returnvalue>
103107
</TERM>
104108
<LISTITEM>
105109
<PARA>
@@ -110,7 +114,7 @@
110114

111115
<VARLISTENTRY>
112116
<TERM>
113-
<ReturnValue>ERROR: alterUser: user "username" does not exist</ReturnValue>
117+
<returnvalue>ERROR: alterUser: user "username" does not exist</returnvalue>
114118
</TERM>
115119
<LISTITEM>
116120
<PARA>
@@ -129,16 +133,18 @@
129133

130134
<REFSECT1 ID="R1-SQL-ALTERUSER-1">
131135
<REFSECT1INFO>
132-
<DATE>1998-04-15</DATE>
136+
<DATE>1998-09-08</DATE>
133137
</REFSECT1INFO>
134138
<TITLE>
135139
Description
136140
</TITLE>
137141
<PARA>
138-
ALTER USER is used to change the attributes of a user's
139-
PostgreSQL account. Please note that it is not possible
142+
<command>ALTER USER</command> is used to change the attributes of a user's
143+
<productname>Postgres</productname> account.
144+
Please note that it is not possible
140145
to alter a user's "usesysid" via the alter user
141-
statement. Also, it is only possible for the PostgreSQL
146+
statement. Also, it is only possible for the
147+
<productname>Postgres</productname>
142148
user or any user with read and modify permissions on
143149
"pg_shadow" to alter user passwords.
144150
</PARA>
@@ -150,21 +156,24 @@
150156

151157
<REFSECT2 ID="R2-SQL-ALTERUSER-3">
152158
<REFSECT2INFO>
153-
<DATE>1998-04-15</DATE>
159+
<DATE>1998-09-08</DATE>
154160
</REFSECT2INFO>
155161
<TITLE>
156162
Notes
157163
</TITLE>
158164
<PARA>
159-
ALTER USER statement is a PostgreSQL language extension.
165+
<command>ALTER USER</command> statement
166+
is a <productname>Postgres</productname>
167+
language extension.
160168
</para>
161169
<para>
162-
Refer to CREATE/DROP USER statements to create/remove an user
170+
Refer to <command>CREATE/DROP USER</command>
171+
to create or remove a user
163172
account.
164173
</para>
165174
<para>
166-
At the current release (6.3.2), the IN GROUP clause is parsed
167-
but has noeffect. When it is fully implemented, it is
175+
In the current release (v6.4), the IN GROUP clause is parsed
176+
but has noaffect. When it is fully implemented, it is
168177
intended to modify the pg_group relation.
169178
</para>
170179
</REFSECT2>
@@ -178,33 +187,33 @@
178187
Change a user password
179188
</PARA>
180189
<ProgramListing>
181-
ALTER USER davide WITH PASSWORD hu8jmn3;
190+
ALTER USER davide WITH PASSWORD hu8jmn3;
182191
</ProgramListing>
183192
<para>
184193
Change a user's valid until date
185194
</para>
186195
<ProgramListing>
187-
ALTER USER manuel VALID UNTIL 'Jan 31 2030';
196+
ALTER USER manuel VALID UNTIL 'Jan 31 2030';
188197
</ProgramListing>
189198
<para>
190199
Change a user's valid until date, specifying that his
191200
authorisation should expire at midday on 4th May 1998 using
192201
the time zone which is one hour ahead of UTC
193202
</para>
194203
<ProgramListing>
195-
ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1';
204+
ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1';
196205
</ProgramListing>
197206
<para>
198207
Give a user the ability to create other users and new databases.
199208
</para>
200209
<programlisting>
201-
ALTER USER miriam CREATEUSER CREATEDB;
210+
ALTER USER miriam CREATEUSER CREATEDB;
202211
</programlisting>
203212
<para>
204213
Place a user in two groups
205214
</para>
206215
<programlisting>
207-
ALTER USER miriam IN GROUP sales, payroll;
216+
ALTER USER miriam IN GROUP sales, payroll;
208217
</programlisting>
209218
</REFSECT1>
210219

@@ -217,13 +226,15 @@ the time zone which is one hour ahead of UTC
217226

218227
<REFSECT2 ID="R2-SQL-ALTERUSER-4">
219228
<REFSECT2INFO>
220-
<DATE>1998-04-15</DATE>
229+
<DATE>1998-09-08</DATE>
221230
</REFSECT2INFO>
222231
<TITLE>
223232
SQL92
224233
</TITLE>
225234
<PARA>
226-
There is no ALTER USER statement in SQL92. The standard leaves
235+
There is no <command>ALTER USER</command> statement in
236+
<acronym>SQL92</acronym>.
237+
The standard leaves
227238
the definition of users to the implementation.
228239
</PARA>
229240
</refsect1>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp