Hello,

Attached is a patch for the default message from psql. Couple of things
of note:

1. I removed the force wrapping, instead allowing the terminal to do
it. This seems to work in X and well as on the console. I am not sure
if I like this or not and am not opposed to changing to a forced wrap.

2. I significantly reduced the wording making the intro more of a
notice than a welcome message.

3. I added a new line to help.c which stands for Execution. I read
the \? help three times before finding \g in the Query Buffer section.
That doesn't seem to me to be a good sign. I left the \g in Query
Buffer as well (yes its redundant) because it shows other options for
use with \g.

Please let me know what you think.

Sincerely,

Joshau D. Drake

-- 
The PostgreSQL Company since 1997: http://www.commandprompt.com/ 
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate


? psql-Log
? psql_patch.diff
Index: help.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/help.c,v
retrieving revision 1.126
diff -c -r1.126 help.c
*** help.c	4 Apr 2008 18:00:25 -0000	1.126
--- help.c	21 Apr 2008 20:11:06 -0000
***************
*** 168,173 ****
--- 168,175 ----
  	 * if this " is the start of the string then it ought to end there to fit
  	 * in 80 columns >> "
  	 */
+ 	fprintf(output, _("Execution\n"));
+ 	fprintf(output, _("  \\g or ;	 execute query\n\n"));
  	fprintf(output, _("General\n"));
  	fprintf(output, _("  \\c[onnect] [DBNAME|- USER|- HOST|- PORT|-]\n"
  			"                 connect to new database (currently \"%s\")\n"),
Index: startup.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/startup.c,v
retrieving revision 1.146
diff -c -r1.146 startup.c
*** startup.c	1 Jan 2008 19:45:56 -0000	1.146
--- startup.c	21 Apr 2008 20:11:06 -0000
***************
*** 315,340 ****
  					server_version = server_ver_str;
  				}
  
! 				printf(_("Welcome to %s %s (server %s), the PostgreSQL interactive terminal.\n\n"),
! 					   pset.progname, PG_VERSION, server_version);
  			}
  			else
! 				printf(_("Welcome to %s %s, the PostgreSQL interactive terminal.\n\n"),
  					   pset.progname, PG_VERSION);
  
! 			printf(_("Type:  \\copyright for distribution terms\n"
! 					 "       \\h for help with SQL commands\n"
! 					 "       \\? for help with psql commands\n"
! 				  "       \\g or terminate with semicolon to execute query\n"
! 					 "       \\q to quit\n\n"));
! 
! 			if (pset.sversion / 100 != client_ver / 100)
! 				printf(_("WARNING:  You are connected to a server with major version %d.%d,\n"
! 						 "but your %s client is major version %d.%d.  Some backslash commands,\n"
! 						 "such as \\d, might not work properly.\n\n"),
! 					   pset.sversion / 10000, (pset.sversion / 100) % 100,
! 					   pset.progname,
! 					   client_ver / 10000, (client_ver / 100) % 100);
  
  #ifdef USE_SSL
  			printSSLInfo();
--- 315,332 ----
  					server_version = server_ver_str;
  				}
  
! 				printf(_("\n%s %s"),
! 					   pset.progname, PG_VERSION);
! 					   if (pset.sversion / 100 != client_ver / 100)
! 				printf(_(", WARNING: server version %d.%d, client version %d.%d. Some features may not work.\n\n"),
! 					   pset.sversion / 10000, (pset.sversion / 100) % 100,
! 					   client_ver / 10000, (client_ver / 100) % 100);
  			}
  			else
! 				printf(_("\nWelcome to %s %s, the PostgreSQL interactive terminal.\n\n"),
  					   pset.progname, PG_VERSION);
  
! 			printf(_("Type:  \\help or for SQL help, \\? for psql help\n\n"));
  
  #ifdef USE_SSL
  			printSSLInfo();
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to