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 */
1515
1616
1717static 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 );
2222static 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
218218static void
219219vacuum_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
308308static 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