5
5
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
6
6
* Portions Copyright (c) 1994, Regents of the University of California
7
7
*
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 $
9
9
*
10
10
*-------------------------------------------------------------------------
11
11
*/
15
15
16
16
17
17
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 ,
19
19
const char * table , const char * host , const char * port ,
20
20
const char * username , enum trivalue prompt_password ,
21
21
const char * progname , bool echo );
22
22
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 ,
24
24
const char * host , const char * port ,
25
25
const char * username , enum trivalue prompt_password ,
26
26
const char * progname , bool echo , bool quiet );
@@ -41,7 +41,7 @@ main(int argc, char *argv[])
41
41
{"quiet" , no_argument , NULL , 'q' },
42
42
{"dbname" , required_argument , NULL , 'd' },
43
43
{"analyze" , no_argument , NULL , 'z' },
44
- {"only- analyze" , no_argument , NULL , 'o' },
44
+ {"analyze-only " , no_argument , NULL , 'o' },
45
45
{"freeze" , no_argument , NULL , 'F' },
46
46
{"all" , no_argument , NULL , 'a' },
47
47
{"table" , required_argument , NULL , 't' },
@@ -63,7 +63,7 @@ main(int argc, char *argv[])
63
63
bool echo = false;
64
64
bool quiet = false;
65
65
bool and_analyze = false;
66
- bool only_analyze = false;
66
+ bool analyze_only = false;
67
67
bool freeze = false;
68
68
bool alldb = false;
69
69
char * table = NULL ;
@@ -108,7 +108,7 @@ main(int argc, char *argv[])
108
108
and_analyze = true;
109
109
break ;
110
110
case 'o' :
111
- only_analyze = true;
111
+ analyze_only = true;
112
112
break ;
113
113
case 'F' :
114
114
freeze = true;
@@ -155,7 +155,7 @@ main(int argc, char *argv[])
155
155
exit (1 );
156
156
}
157
157
158
- if (only_analyze )
158
+ if (analyze_only )
159
159
{
160
160
if (full )
161
161
{
@@ -169,7 +169,7 @@ main(int argc, char *argv[])
169
169
progname );
170
170
exit (1 );
171
171
}
172
- /* allow 'and_analyze' with 'only_analyze ' */
172
+ /* allow 'and_analyze' with 'analyze_only ' */
173
173
}
174
174
175
175
setup_cancel_handler ();
@@ -189,7 +189,7 @@ main(int argc, char *argv[])
189
189
exit (1 );
190
190
}
191
191
192
- vacuum_all_databases (full , inplace , verbose , and_analyze , only_analyze , freeze ,
192
+ vacuum_all_databases (full , inplace , verbose , and_analyze , analyze_only , freeze ,
193
193
host , port , username , prompt_password ,
194
194
progname , echo , quiet );
195
195
}
@@ -205,7 +205,7 @@ main(int argc, char *argv[])
205
205
dbname = get_user_name (progname );
206
206
}
207
207
208
- vacuum_one_database (dbname , full , inplace , verbose , and_analyze , only_analyze ,
208
+ vacuum_one_database (dbname , full , inplace , verbose , and_analyze , analyze_only ,
209
209
freeze , table ,
210
210
host , port , username , prompt_password ,
211
211
progname , echo );
@@ -217,7 +217,7 @@ main(int argc, char *argv[])
217
217
218
218
static void
219
219
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 ,
221
221
const char * host , const char * port ,
222
222
const char * username , enum trivalue prompt_password ,
223
223
const char * progname , bool echo )
@@ -230,7 +230,7 @@ vacuum_one_database(const char *dbname, bool full, bool inplace, bool verbose, b
230
230
231
231
conn = connectDatabase (dbname , host , port , username , prompt_password , progname );
232
232
233
- if (only_analyze )
233
+ if (analyze_only )
234
234
{
235
235
appendPQExpBuffer (& sql , "ANALYZE" );
236
236
if (verbose )
@@ -306,7 +306,7 @@ vacuum_one_database(const char *dbname, bool full, bool inplace, bool verbose, b
306
306
307
307
308
308
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 ,
310
310
bool freeze , const char * host , const char * port ,
311
311
const char * username , enum trivalue prompt_password ,
312
312
const char * progname , bool echo , bool quiet )
@@ -329,7 +329,7 @@ vacuum_all_databases(bool full, bool inplace, bool verbose, bool and_analyze, bo
329
329
fflush (stdout );
330
330
}
331
331
332
- vacuum_one_database (dbname , full , inplace , verbose , and_analyze , only_analyze ,
332
+ vacuum_one_database (dbname , full , inplace , verbose , and_analyze , analyze_only ,
333
333
freeze , NULL , host , port , username , prompt_password ,
334
334
progname , echo );
335
335
}
@@ -351,7 +351,7 @@ help(const char *progname)
351
351
printf (_ (" -f, --full do full vacuuming\n" ));
352
352
printf (_ (" -F, --freeze freeze row transaction information\n" ));
353
353
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" ));
355
355
printf (_ (" -q, --quiet don't write any messages\n" ));
356
356
printf (_ (" -t, --table='TABLE[(COLUMNS)]' vacuum specific table only\n" ));
357
357
printf (_ (" -v, --verbose write a lot of output\n" ));
0 commit comments