Commit 02d79e76 authored by Tom Lane's avatar Tom Lane

Rename psql's VERBOSE variable to VERBOSITY, per suggestion from Bruce.

parent 81b5c8a1
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.92 2003/07/27 03:32:26 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.93 2003/07/28 00:14:42 tgl Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -2066,7 +2066,7 @@ bar ...@@ -2066,7 +2066,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><varname>VERBOSE</varname></term> <term><varname>VERBOSITY</varname></term>
<listitem> <listitem>
<para> <para>
This variable can be set to the values <literal>default</>, This variable can be set to the values <literal>default</>,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright 2000-2002 by PostgreSQL Global Development Group * Copyright 2000-2002 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.98 2003/07/23 08:47:38 petere Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.99 2003/07/28 00:14:42 tgl Exp $
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
#include "command.h" #include "command.h"
...@@ -707,8 +707,8 @@ exec_command(const char *cmd, ...@@ -707,8 +707,8 @@ exec_command(const char *cmd,
if (SetVariable(pset.vars, opt0, newval)) if (SetVariable(pset.vars, opt0, newval))
{ {
/* Check for special variables */ /* Check for special variables */
if (strcmp(opt0, "VERBOSE") == 0) if (strcmp(opt0, "VERBOSITY") == 0)
SyncVerboseVariable(); SyncVerbosityVariable();
} }
else else
{ {
...@@ -1469,7 +1469,7 @@ SyncVariables(void) ...@@ -1469,7 +1469,7 @@ SyncVariables(void)
SetVariable(pset.vars, "ENCODING", pg_encoding_to_char(pset.encoding)); SetVariable(pset.vars, "ENCODING", pg_encoding_to_char(pset.encoding));
/* send stuff to it, too */ /* send stuff to it, too */
SyncVerboseVariable(); SyncVerbosityVariable();
} }
/* /*
...@@ -1488,12 +1488,12 @@ UnsyncVariables(void) ...@@ -1488,12 +1488,12 @@ UnsyncVariables(void)
} }
/* /*
* Update connection state from VERBOSE variable * Update connection state from VERBOSITY variable
*/ */
void void
SyncVerboseVariable(void) SyncVerbosityVariable(void)
{ {
switch (SwitchVariable(pset.vars, "VERBOSE", switch (SwitchVariable(pset.vars, "VERBOSITY",
"default", "terse", "verbose", NULL)) "default", "terse", "verbose", NULL))
{ {
case 1: /* default */ case 1: /* default */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/command.h,v 1.15 2003/06/28 00:12:40 tgl Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/command.h,v 1.16 2003/07/28 00:14:43 tgl Exp $
*/ */
#ifndef COMMAND_H #ifndef COMMAND_H
#define COMMAND_H #define COMMAND_H
...@@ -42,6 +42,6 @@ extern void SyncVariables(void); ...@@ -42,6 +42,6 @@ extern void SyncVariables(void);
extern void UnsyncVariables(void); extern void UnsyncVariables(void);
extern void SyncVerboseVariable(void); extern void SyncVerbosityVariable(void);
#endif /* COMMAND_H */ #endif /* COMMAND_H */
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.75 2003/07/23 08:47:40 petere Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.76 2003/07/28 00:14:43 tgl Exp $
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
...@@ -141,7 +141,7 @@ main(int argc, char *argv[]) ...@@ -141,7 +141,7 @@ main(int argc, char *argv[])
/* Default values for variables that are used in noninteractive cases */ /* Default values for variables that are used in noninteractive cases */
SetVariableBool(pset.vars, "AUTOCOMMIT"); SetVariableBool(pset.vars, "AUTOCOMMIT");
SetVariable(pset.vars, "VERBOSE", "default"); SetVariable(pset.vars, "VERBOSITY", "default");
pset.notty = (!isatty(fileno(stdin)) || !isatty(fileno(stdout))); pset.notty = (!isatty(fileno(stdin)) || !isatty(fileno(stdout)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment