diff options
author | Bruce Momjian | 2008-04-04 18:00:25 +0000 |
---|---|---|
committer | Bruce Momjian | 2008-04-04 18:00:25 +0000 |
commit | 38ab4366ded76693fe5f1b99d97357e10f7b9cbf (patch) | |
tree | ce945a1a872092b9aa762724564048ec302b556f | |
parent | a5a68b6fb2e1dea8b1831091144465f400980783 (diff) |
Have psql command 'help' suggest the use of \?, updated version.
Greg Sabino Mullane
-rw-r--r-- | src/bin/psql/help.c | 1 | ||||
-rw-r--r-- | src/bin/psql/mainloop.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index 792c4eea22..8d3b24368d 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -188,7 +188,6 @@ slashUsage(unsigned short int pager) ON(pset.timing)); fprintf(output, _(" \\unset NAME unset (delete) internal variable\n")); fprintf(output, _(" \\! [COMMAND] execute command in shell or start interactive shell\n")); - fprintf(output, _(" \\? display this help output\n")); fprintf(output, "\n"); fprintf(output, _("Query Buffer\n")); diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c index ab0743a853..cbeef4637c 100644 --- a/src/bin/psql/mainloop.c +++ b/src/bin/psql/mainloop.c @@ -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; } |