diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 4d31f426d9e92853bf2453458c40469662b075b1..78cfaf7309745c208e7c70a8e63162c1592d6c64 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.24 2000/02/10 20:08:55 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.25 2000/02/13 21:45:13 petere Exp $
 Postgres documentation
 -->
 
@@ -609,7 +609,7 @@ Tue Oct 26 21:40:57 CEST 1999
 	<note>
 	<para>
 	If you want to see the lines on the screen as they are read you must set
-	the variable <envar>ECHO</envar> to <literal>full</literal>.
+	the variable <envar>ECHO</envar> to <literal>all</literal>.
 	</para>
 	</note>
         </listitem>
@@ -1189,6 +1189,18 @@ Access permissions for database "test"
 
   <para>
   <variablelist>
+    <varlistentry>
+      <term>-a, --echo-all</term>
+      <listitem>
+      <para>
+      Print all the lines to the screen as they are read. This is more useful for
+      script processing rather than interactive mode.
+      This is equivalent to setting the variable <envar>ECHO</envar> to <literal>all</literal>.
+      </para>
+      </listitem>
+    </varlistentry>
+
+
     <varlistentry>
       <term>-A, --no-align</term>
       <listitem>
@@ -1234,11 +1246,12 @@ Access permissions for database "test"
 
 
     <varlistentry>
-      <term>-e, --echo</term>
+      <term>-e, --echo-queries</term>
       <listitem>
       <para>
-      In non-interactive mode, all lines are printed to the screen as they are read.
-      This is equivalent to setting the variable <envar>ECHO</envar> to <literal>full</literal>.
+      Show all queries that are sent to the backend.
+      This is equivalent to setting the variable <envar>ECHO</envar>
+      to <literal>queries</literal>.
       </para>
       </listitem>
     </varlistentry>
@@ -1621,12 +1634,12 @@ bar
         <term><envar>ECHO</envar></term>
 	<listitem>
 	<para>
-	If set to <quote><literal>full</literal></quote>, all lines entered or from a script
+	If set to <quote><literal>all</literal></quote>, all lines entered or from a script
         are written to the standard output before they
-	are parsed or executed. To specify this on program startup, in conjunction with the
-	<option>-f</option> option perhaps, use the switch <option>-e</option>.
-        If set to <quote><literal>brief</literal></quote>, <application>psql</application>
-        merely prints all queries as they are sent to the backend.
+	are parsed or executed. To specify this on program startup, use the switch
+        <option>-a</option>. If set to <quote><literal>queries</literal></quote>,
+        <application>psql</application> merely prints all queries as they are sent to the
+        backend. The option for this is <option>-e</option>.
 	</para>
 	</listitem>
       </varlistentry>
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 084d8790e6f25734fd8b9912131a094cd08c9802..49249c27db69b7c6f8a8bd65e046bae96ef0b49b 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -3,7 +3,7 @@
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.12 2000/02/07 23:10:06 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.13 2000/02/13 21:45:14 petere Exp $
  */
 #include <c.h>
 #include "common.h"
@@ -382,7 +382,7 @@ SendQuery(const char *query)
     else
     {
         const char * var = GetVariable(pset.vars, "ECHO");
-        if (var && strcmp(var, "brief")==0)
+        if (var && strncmp(var, "queries", strlen(var))==0)
             puts(query);
     }
 
diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c
index fe1d76bc76c94da1f4d4e8070ab5c7d70df4e9a0..ac252086d429a8b653dbba60bc36aeb313d8b0de 100644
--- a/src/bin/psql/help.c
+++ b/src/bin/psql/help.c
@@ -3,7 +3,7 @@
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.17 2000/02/10 20:08:56 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.18 2000/02/13 21:45:14 petere Exp $
  */
 #include <c.h>
 #include "help.h"
@@ -72,7 +72,7 @@ usage(void)
 	puts(  "Usage:");
     puts(  "  psql [options] [dbname [username]]\n");
     puts(  "Options:");
-/*	puts(  "  -a              Echo all input from script");*/
+	puts(  "  -a              Echo all input from script");
 	puts(  "  -A              Unaligned table output mode (-P format=unaligned)");
 	puts(  "  -c <query>      Run only single query (or slash command) and exit");
 
diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c
index e16bf782f3b667c72bdd9354fde7a24b7cdc6d1b..1d5023925da2abe50679a1f0f11317e849646447 100644
--- a/src/bin/psql/mainloop.c
+++ b/src/bin/psql/mainloop.c
@@ -3,7 +3,7 @@
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.18 2000/02/10 20:08:56 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.19 2000/02/13 21:45:14 petere Exp $
  */
 #include <c.h>
 #include "mainloop.h"
@@ -217,7 +217,7 @@ MainLoop(FILE *source)
 
 		/* echo back if flag is set */
         var = GetVariable(pset.vars, "ECHO");
-        if (var && strcmp(var, "full")==0)
+        if (var && strcmp(var, "all")==0)
             puts(line);
         fflush(stdout);
 
diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c
index fa6e9fbf202f279d346bf16a03ebf1c7f6df99eb..2905e721449ee324b51a01cbf9278a6c5d2bdb42 100644
--- a/src/bin/psql/startup.c
+++ b/src/bin/psql/startup.c
@@ -3,7 +3,7 @@
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.22 2000/02/07 23:10:06 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.23 2000/02/13 21:45:14 petere Exp $
  */
 #include <c.h>
 
@@ -280,17 +280,17 @@ parse_options(int argc, char *argv[], struct adhoc_opts * options)
 #ifdef HAVE_GETOPT_LONG
 	static struct option long_options[] =
     {
+        {"echo-all", no_argument, NULL, 'a'},
 		{"no-align", no_argument, NULL, 'A'},
 		{"command", required_argument, NULL, 'c'},
 		{"dbname", required_argument, NULL, 'd'},
-		{"echo", no_argument, NULL, 'e'},
+		{"echo-queries", no_argument, NULL, 'e'},
 		{"echo-hidden", no_argument, NULL, 'E'},
 		{"file", required_argument, NULL, 'f'},
 		{"field-separator", required_argument, NULL, 'F'},
 		{"host", required_argument, NULL, 'h'},
 		{"html", no_argument, NULL, 'H'},
 		{"list", no_argument, NULL, 'l'},
-		{"no-readline", no_argument, NULL, 'n'},
 		{"output", required_argument, NULL, 'o'},
 		{"port", required_argument, NULL, 'p'},
 		{"pset", required_argument, NULL, 'P'},
@@ -320,18 +320,20 @@ parse_options(int argc, char *argv[], struct adhoc_opts * options)
 	memset(options, 0, sizeof *options);
 
 #ifdef HAVE_GETOPT_LONG
-	while ((c = getopt_long(argc, argv, "Ac:d:eEf:F:lh:Hno:p:P:qRsStT:uU:v:VWx?", long_options, &optindex)) != -1)
+	while ((c = getopt_long(argc, argv, "aAc:d:eEf:F:lh:Hno:p:P:qRsStT:uU:v:VWx?", long_options, &optindex)) != -1)
 #else /* not HAVE_GETOPT_LONG */
-
 	/*
 	 * Be sure to leave the '-' in here, so we can catch accidental long
 	 * options.
 	 */
-	while ((c = getopt(argc, argv, "Ac:d:eEf:F:lh:Hno:p:P:qRsStT:uU:v:VWx?-")) != -1)
+	while ((c = getopt(argc, argv, "aAc:d:eEf:F:lh:Hno:p:P:qRsStT:uU:v:VWx?-")) != -1)
 #endif /* not HAVE_GETOPT_LONG */
 	{
 		switch (c)
 		{
+			case 'a':
+				SetVariable(pset.vars, "ECHO", "all");
+				break;
 			case 'A':
 				pset.popt.topt.format = PRINT_UNALIGNED;
 				break;
@@ -346,10 +348,10 @@ parse_options(int argc, char *argv[], struct adhoc_opts * options)
 				options->dbname = optarg;
 				break;
 			case 'e':
-				SetVariable(pset.vars, "ECHO", "full");
+				SetVariable(pset.vars, "ECHO", "queries");
 				break;
 			case 'E':
-				SetVariable(pset.vars, "ECHO_HIDDEN", "");
+				SetVariableBool(pset.vars, "ECHO_HIDDEN");
 				break;
 			case 'f':
 				options->action = ACT_FILE;
@@ -402,16 +404,16 @@ parse_options(int argc, char *argv[], struct adhoc_opts * options)
 					break;
 				}
 			case 'q':
-				SetVariable(pset.vars, "QUIET", "");
+				SetVariableBool(pset.vars, "QUIET");
 				break;
             case 'R':
                 pset.popt.topt.recordSep = xstrdup(optarg);
                 break;
 			case 's':
-				SetVariable(pset.vars, "SINGLESTEP", "");
+				SetVariableBool(pset.vars, "SINGLESTEP");
 				break;
 			case 'S':
-				SetVariable(pset.vars, "SINGLELINE", "");
+				SetVariableBool(pset.vars, "SINGLELINE");
 				break;
 			case 't':
 				pset.popt.topt.tuples_only = true;
diff --git a/src/bin/psql/variables.c b/src/bin/psql/variables.c
index b0523dcb67530c64ad0efedd5d8a3165d6cf6ca6..e7d67d6dc58c825520760a5366ef0e0a58f4058d 100644
--- a/src/bin/psql/variables.c
+++ b/src/bin/psql/variables.c
@@ -3,7 +3,7 @@
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/variables.c,v 1.5 2000/01/29 16:58:49 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/variables.c,v 1.6 2000/02/13 21:45:14 petere Exp $
  */
 #include <c.h>
 #include "variables.h"
@@ -111,6 +111,14 @@ SetVariable(VariableSpace space, const char *name, const char *value)
 
 
 
+bool
+SetVariableBool(VariableSpace space, const char *name)
+{
+    return SetVariable(space, name, "");
+}
+
+
+
 bool
 DeleteVariable(VariableSpace space, const char *name)
 {
diff --git a/src/bin/psql/variables.h b/src/bin/psql/variables.h
index 2b476dd0c31e9244bee89bc9c57fc733110de062..521efc51dde577ed9ad29f48fe4d0539cd82cbe5 100644
--- a/src/bin/psql/variables.h
+++ b/src/bin/psql/variables.h
@@ -3,17 +3,13 @@
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/variables.h,v 1.5 2000/01/29 16:58:49 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/variables.h,v 1.6 2000/02/13 21:45:14 petere Exp $
  */
 
 /*
  * This implements a sort of variable repository. One could also think of it
  * as cheap version of an associative array. In each one of these
  * datastructures you can store name/value pairs.
- *
- * All functions (should) follow the Shit-In-Shit-Out (SISO) principle, i.e.,
- * you can pass them NULL pointers and the like and they will return something
- * appropriate.
  */
 
 #ifndef VARIABLES_H
@@ -37,6 +33,7 @@ VariableSpace CreateVariableSpace(void);
 const char *GetVariable(VariableSpace space, const char *name);
 bool		GetVariableBool(VariableSpace space, const char *name);
 bool		SetVariable(VariableSpace space, const char *name, const char *value);
+bool        SetVariableBool(VariableSpace space, const char *name);
 bool		DeleteVariable(VariableSpace space, const char *name);
 void		DestroyVariableSpace(VariableSpace space);
 
diff --git a/src/test/regress/regress.sh b/src/test/regress/regress.sh
index 195b270ce734a57eaf318b82b491e0d963105363..aaa8f2e85dfa1ac8107b546c7657707d2de9fd87 100755
--- a/src/test/regress/regress.sh
+++ b/src/test/regress/regress.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.39 2000/01/09 20:54:36 tgl Exp $
+# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.40 2000/02/13 21:45:15 petere Exp $
 #
 if [ $# -eq 0 ]
 then
@@ -30,7 +30,7 @@ fi
 PGTZ="PST8PDT"; export PGTZ
 PGDATESTYLE="Postgres,US"; export PGDATESTYLE
 
-FRONTEND="psql $HOSTLOC -n -e -q"
+FRONTEND="psql $HOSTLOC -a -q"
 
 # ----------
 # Scan resultmap file to find which platform-specific expected files to use.
diff --git a/src/test/regress/run_check.sh b/src/test/regress/run_check.sh
index d6dd247de62c94c6b4413dda3938183cf343bc99..9314076457bc7717ad3b64e0c1409e07ff12481f 100755
--- a/src/test/regress/run_check.sh
+++ b/src/test/regress/run_check.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $Header: /cvsroot/pgsql/src/test/regress/Attic/run_check.sh,v 1.7 2000/01/16 20:05:00 petere Exp $
+# $Header: /cvsroot/pgsql/src/test/regress/Attic/run_check.sh,v 1.8 2000/02/13 21:45:15 petere Exp $
 
 # ----------
 # Check call syntax
@@ -86,7 +86,7 @@ PGDATESTYLE="Postgres,US"; export PGDATESTYLE
 # ----------
 # The SQL shell to use during this test
 # ----------
-FRONTEND="$BINDIR/psql $HOSTLOC -n -e -q"
+FRONTEND="$BINDIR/psql $HOSTLOC -a -q"
 
 # ----------
 # Scan resultmap file to find which platform-specific expected files to use.