From: | "Greg Sabino Mullane" <greg(at)turnstep(dot)com> |
---|---|
To: | alvherre(at)commandprompt(dot)com |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Friendly help for psql |
Date: | 2008-04-02 12:55:40 |
Message-ID: | ca94d2d612e4e10e7d2e001f3d376159@biglumber.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Index: mainloop.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/mainloop.c,v
retrieving revision 1.87
diff -c -r1.87 mainloop.c
*** mainloop.c 1 Jan 2008 19:45:56 -0000 1.87
--- mainloop.c 2 Apr 2008 12:51:36 -0000
***************
*** 171,176 ****
--- 171,187 ----
continue;
}
+ /* 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) {
+ free(line);
+ 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 \\q to quit.");
+ puts("Visit http://postgresql.org for help on PostgreSQL\n");
+ continue;
+ }
+
/* echo back if flag is set */
if (pset.echo == PSQL_ECHO_ALL && !pset.cur_cmd_interactive)
puts(line);
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Sabino Mullane | 2008-04-02 13:07:01 | Re: [GENERAL] SHA1 on postgres 8.3 |
Previous Message | Zdenek Kotala | 2008-04-02 12:44:08 | Re: Can Postgres 8.x start if some disks containing tablespaces are not mounted? |
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Sabino Mullane | 2008-04-02 13:17:52 | Re: Consistent \d commands in psql |
Previous Message | Bruce Momjian | 2008-04-02 12:35:30 | Re: Show login privilege in psql \du command |