Skip to content

Commit 1a8d4c9

Browse files
committed
Rename new vacuumdb option to --analyze-only from --only-analyze.
1 parent 901be0f commit 1a8d4c9

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

doc/src/sgml/ref/vacuumdb.sgml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.47 2010/01/06 05:31:13 itagaki Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.48 2010/01/07 12:38:55 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -28,7 +28,7 @@ PostgreSQL documentation
2828
<group><arg>--freeze</arg><arg>-F</arg></group>
2929
<group><arg>--verbose</arg><arg>-v</arg></group>
3030
<group><arg>--analyze</arg><arg>-z</arg></group>
31-
<group><arg>--only-analyze</arg><arg>-o</arg></group>
31+
<group><arg>--analyze-only</arg><arg>-o</arg></group>
3232
<arg>--table | -t <replaceable>table</replaceable>
3333
<arg>( <replaceable class="parameter">column</replaceable> [,...] )</arg>
3434
</arg>
@@ -42,7 +42,7 @@ PostgreSQL documentation
4242
<group><arg>--freeze</arg><arg>-F</arg></group>
4343
<group><arg>--verbose</arg><arg>-v</arg></group>
4444
<group><arg>--analyze</arg><arg>-z</arg></group>
45-
<group><arg>--only-analyze</arg><arg>-o</arg></group>
45+
<group><arg>--analyze-only</arg><arg>-o</arg></group>
4646
</cmdsynopsis>
4747
</refsynopsisdiv>
4848

@@ -143,7 +143,7 @@ PostgreSQL documentation
143143

144144
<varlistentry>
145145
<term><option>-o</option></term>
146-
<term><option>--only-analyze</option></term>
146+
<term><option>--analyze-only</option></term>
147147
<listitem>
148148
<para>
149149
Only calculate statistics for use by the optimizer (no vacuum).
@@ -168,7 +168,7 @@ PostgreSQL documentation
168168
<para>
169169
Clean or analyze <replaceable class="parameter">table</replaceable> only.
170170
Column names can be specified only in conjunction with
171-
the <option>--analyze</option> or <option>--only-analyze</option> options.
171+
the <option>--analyze</option> or <option>--analyze-only</option> options.
172172
</para>
173173
<tip>
174174
<para>

src/bin/scripts/vacuumdb.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
8-
* $PostgreSQL: pgsql/src/bin/scripts/vacuumdb.c,v 1.31 2010/01/06 16:04:05 momjian Exp $
8+
* $PostgreSQL: pgsql/src/bin/scripts/vacuumdb.c,v 1.32 2010/01/07 12:38:55 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -15,12 +15,12 @@
1515

1616

1717
static void vacuum_one_database(const char *dbname, bool full, bool inplace, bool verbose,
18-
bool and_analyze, bool only_analyze, bool freeze,
18+
bool and_analyze, bool analyze_only, bool freeze,
1919
const char *table, const char *host, const char *port,
2020
const char *username, enum trivalue prompt_password,
2121
const char *progname, bool echo);
2222
static void vacuum_all_databases(bool full, bool inplace, bool verbose, bool and_analyze,
23-
bool only_analyze, bool freeze,
23+
bool analyze_only, bool freeze,
2424
const char *host, const char *port,
2525
const char *username, enum trivalue prompt_password,
2626
const char *progname, bool echo, bool quiet);
@@ -41,7 +41,7 @@ main(int argc, char *argv[])
4141
{"quiet", no_argument, NULL, 'q'},
4242
{"dbname", required_argument, NULL, 'd'},
4343
{"analyze", no_argument, NULL, 'z'},
44-
{"only-analyze", no_argument, NULL, 'o'},
44+
{"analyze-only", no_argument, NULL, 'o'},
4545
{"freeze", no_argument, NULL, 'F'},
4646
{"all", no_argument, NULL, 'a'},
4747
{"table", required_argument, NULL, 't'},
@@ -63,7 +63,7 @@ main(int argc, char *argv[])
6363
bool echo = false;
6464
bool quiet = false;
6565
bool and_analyze = false;
66-
bool only_analyze = false;
66+
bool analyze_only = false;
6767
bool freeze = false;
6868
bool alldb = false;
6969
char *table = NULL;
@@ -108,7 +108,7 @@ main(int argc, char *argv[])
108108
and_analyze = true;
109109
break;
110110
case 'o':
111-
only_analyze = true;
111+
analyze_only = true;
112112
break;
113113
case 'F':
114114
freeze = true;
@@ -155,7 +155,7 @@ main(int argc, char *argv[])
155155
exit(1);
156156
}
157157

158-
if (only_analyze)
158+
if (analyze_only)
159159
{
160160
if (full)
161161
{
@@ -169,7 +169,7 @@ main(int argc, char *argv[])
169169
progname);
170170
exit(1);
171171
}
172-
/* allow 'and_analyze' with 'only_analyze' */
172+
/* allow 'and_analyze' with 'analyze_only' */
173173
}
174174

175175
setup_cancel_handler();
@@ -189,7 +189,7 @@ main(int argc, char *argv[])
189189
exit(1);
190190
}
191191

192-
vacuum_all_databases(full, inplace, verbose, and_analyze, only_analyze, freeze,
192+
vacuum_all_databases(full, inplace, verbose, and_analyze, analyze_only, freeze,
193193
host, port, username, prompt_password,
194194
progname, echo, quiet);
195195
}
@@ -205,7 +205,7 @@ main(int argc, char *argv[])
205205
dbname = get_user_name(progname);
206206
}
207207

208-
vacuum_one_database(dbname, full, inplace, verbose, and_analyze, only_analyze,
208+
vacuum_one_database(dbname, full, inplace, verbose, and_analyze, analyze_only,
209209
freeze, table,
210210
host, port, username, prompt_password,
211211
progname, echo);
@@ -217,7 +217,7 @@ main(int argc, char *argv[])
217217

218218
static void
219219
vacuum_one_database(const char *dbname, bool full, bool inplace, bool verbose, bool and_analyze,
220-
bool only_analyze, bool freeze, const char *table,
220+
bool analyze_only, bool freeze, const char *table,
221221
const char *host, const char *port,
222222
const char *username, enum trivalue prompt_password,
223223
const char *progname, bool echo)
@@ -230,7 +230,7 @@ vacuum_one_database(const char *dbname, bool full, bool inplace, bool verbose, b
230230

231231
conn = connectDatabase(dbname, host, port, username, prompt_password, progname);
232232

233-
if (only_analyze)
233+
if (analyze_only)
234234
{
235235
appendPQExpBuffer(&sql, "ANALYZE");
236236
if (verbose)
@@ -306,7 +306,7 @@ vacuum_one_database(const char *dbname, bool full, bool inplace, bool verbose, b
306306

307307

308308
static void
309-
vacuum_all_databases(bool full, bool inplace, bool verbose, bool and_analyze, bool only_analyze,
309+
vacuum_all_databases(bool full, bool inplace, bool verbose, bool and_analyze, bool analyze_only,
310310
bool freeze, const char *host, const char *port,
311311
const char *username, enum trivalue prompt_password,
312312
const char *progname, bool echo, bool quiet)
@@ -329,7 +329,7 @@ vacuum_all_databases(bool full, bool inplace, bool verbose, bool and_analyze, bo
329329
fflush(stdout);
330330
}
331331

332-
vacuum_one_database(dbname, full, inplace, verbose, and_analyze, only_analyze,
332+
vacuum_one_database(dbname, full, inplace, verbose, and_analyze, analyze_only,
333333
freeze, NULL, host, port, username, prompt_password,
334334
progname, echo);
335335
}
@@ -351,7 +351,7 @@ help(const char *progname)
351351
printf(_(" -f, --full do full vacuuming\n"));
352352
printf(_(" -F, --freeze freeze row transaction information\n"));
353353
printf(_(" -i, --inplace do full inplace vacuuming\n"));
354-
printf(_(" -o, --only-analyze only update optimizer hints\n"));
354+
printf(_(" -o, --analyze-only only update optimizer hints\n"));
355355
printf(_(" -q, --quiet don't write any messages\n"));
356356
printf(_(" -t, --table='TABLE[(COLUMNS)]' vacuum specific table only\n"));
357357
printf(_(" -v, --verbose write a lot of output\n"));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy