Skip site navigation (1) Skip section navigation (2)

Re: Friendly help for psql

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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);



In response to

pgsql-hackers by date

Next:From: Greg Sabino MullaneDate: 2008-04-02 13:07:01
Subject: Re: [GENERAL] SHA1 on postgres 8.3
Previous:From: Zdenek KotalaDate: 2008-04-02 12:44:08
Subject: Re: Can Postgres 8.x start if some disks containing tablespaces are not mounted?

pgsql-patches by date

Next:From: Greg Sabino MullaneDate: 2008-04-02 13:17:52
Subject: Re: Consistent \d commands in psql
Previous:From: Bruce MomjianDate: 2008-04-02 12:35:30
Subject: Re: Show login privilege in psql \du command

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group