summaryrefslogtreecommitdiff
path: root/src/bin/psql/mainloop.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2008-04-04 18:00:25 +0000
committerBruce Momjian <bruce@momjian.us>2008-04-04 18:00:25 +0000
commitb6f0ad4b0ed7942654a26f04ca167cd2fe3c5d41 (patch)
treea94c3539519c168321991c35cc2d534137a4fd48 /src/bin/psql/mainloop.c
parentdc565af4547389429c3362e34f57c3335f15bd01 (diff)
Have psql command 'help' suggest the use of \?, updated version.
Greg Sabino Mullane
Diffstat (limited to 'src/bin/psql/mainloop.c')
-rw-r--r--src/bin/psql/mainloop.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c
index 3cdcd2d3cd6..bec930b8f5d 100644
--- a/src/bin/psql/mainloop.c
+++ b/src/bin/psql/mainloop.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.88 2008/04/04 17:42:43 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.89 2008/04/04 18:00:25 momjian Exp $
*/
#include "postgres_fe.h"
#include "mainloop.h"
@@ -11,7 +11,6 @@
#include "command.h"
#include "common.h"
-#include "help.h"
#include "input.h"
#include "settings.h"
@@ -172,13 +171,16 @@ MainLoop(FILE *source)
continue;
}
- /* A request for help? Be friendly and show them the slash way of doing things */
+ /* A request for help? Be friendly and give them some guidance */
if (pset.cur_cmd_interactive && query_buf->len == 0 &&
pg_strncasecmp(line, "help", 4) == 0 &&
(line[4] == '\0' || line[4] == ';' || isspace(line[4])))
{
free(line);
- slashUsage(pset.popt.topt.pager);
+ puts("You are using psql, the command-line interface to PostgreSQL.");
+ puts("Enter SQL commands, or type \\? for a list of backslash options.");
+ puts("Use \\h for SQL command help.");
+ puts("Use \\q to quit.");
continue;
}