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 ,
1919const char * table ,const char * host ,const char * port ,
2020const char * username ,enum trivalue prompt_password ,
2121const 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 ,
2424const char * host ,const char * port ,
2525const char * username ,enum trivalue prompt_password ,
2626const 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[])
6363bool echo = false;
6464bool quiet = false;
6565bool and_analyze = false;
66- bool only_analyze = false;
66+ bool analyze_only = false;
6767bool freeze = false;
6868bool alldb = false;
6969char * table = NULL ;
@@ -108,7 +108,7 @@ main(int argc, char *argv[])
108108and_analyze = true;
109109break ;
110110case 'o' :
111- only_analyze = true;
111+ analyze_only = true;
112112break ;
113113case 'F' :
114114freeze = true;
@@ -155,7 +155,7 @@ main(int argc, char *argv[])
155155exit (1 );
156156}
157157
158- if (only_analyze )
158+ if (analyze_only )
159159{
160160if (full )
161161{
@@ -169,7 +169,7 @@ main(int argc, char *argv[])
169169progname );
170170exit (1 );
171171}
172- /* allow 'and_analyze' with 'only_analyze ' */
172+ /* allow 'and_analyze' with 'analyze_only ' */
173173}
174174
175175setup_cancel_handler ();
@@ -189,7 +189,7 @@ main(int argc, char *argv[])
189189exit (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 ,
193193host ,port ,username ,prompt_password ,
194194progname ,echo ,quiet );
195195}
@@ -205,7 +205,7 @@ main(int argc, char *argv[])
205205dbname = 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 ,
209209freeze ,table ,
210210host ,port ,username ,prompt_password ,
211211progname ,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 ,
221221const char * host ,const char * port ,
222222const char * username ,enum trivalue prompt_password ,
223223const char * progname ,bool echo )
@@ -230,7 +230,7 @@ vacuum_one_database(const char *dbname, bool full, bool inplace, bool verbose, b
230230
231231conn = connectDatabase (dbname ,host ,port ,username ,prompt_password ,progname );
232232
233- if (only_analyze )
233+ if (analyze_only )
234234{
235235appendPQExpBuffer (& sql ,"ANALYZE" );
236236if (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 ,
310310bool freeze ,const char * host ,const char * port ,
311311const char * username ,enum trivalue prompt_password ,
312312const char * progname ,bool echo ,bool quiet )
@@ -329,7 +329,7 @@ vacuum_all_databases(bool full, bool inplace, bool verbose, bool and_analyze, bo
329329fflush (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 ,
333333freeze ,NULL ,host ,port ,username ,prompt_password ,
334334progname ,echo );
335335}
@@ -351,7 +351,7 @@ help(const char *progname)
351351printf (_ (" -f, --full do full vacuuming\n" ));
352352printf (_ (" -F, --freeze freeze row transaction information\n" ));
353353printf (_ (" -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" ));
355355printf (_ (" -q, --quiet don't write any messages\n" ));
356356printf (_ (" -t, --table='TABLE[(COLUMNS)]' vacuum specific table only\n" ));
357357printf (_ (" -v, --verbose write a lot of output\n" ));