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);



-- 
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches

Reply via email to