Bruce Momjian wrote:
> OK, here is the mega-print:
> 
>       $ psql test
>       psql (8.4devel, server 8.4devel)
>       WARNING: psql version 8.4, server version 8.4.
>                Some psql features might not work.
>       WARNING: Console code page (44) differs from Windows code page (55)
>                8-bit characters might not work correctly. See psql reference
>                page "Notes for Windows users" for details.
>       SSL connection (cipher: 55, bits: 512)
>       Type "help" for help.
>       
>       test=>
> 

Updated patch applied, docs adjusted for new psql startup banner.

-- 
  Bruce Momjian  <[EMAIL PROTECTED]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/start.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/start.sgml,v
retrieving revision 1.46
diff -c -c -r1.46 start.sgml
*** doc/src/sgml/start.sgml	23 Jan 2008 02:04:47 -0000	1.46
--- doc/src/sgml/start.sgml	16 May 2008 17:06:38 -0000
***************
*** 329,341 ****
      In <command>psql</command>, you will be greeted with the following
      message:
  <screen>
! Welcome to psql &version;, the PostgreSQL interactive terminal.
!  
! Type:  \copyright for distribution terms
!        \h for help with SQL commands
!        \? for help with psql commands
!        \g or terminate with semicolon to execute query
!        \q to quit
   
  mydb=&gt;
  </screen>
--- 329,336 ----
      In <command>psql</command>, you will be greeted with the following
      message:
  <screen>
! psql (&version;)
! Type "help" for help.
   
  mydb=&gt;
  </screen>
Index: doc/src/sgml/ref/psql-ref.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.205
diff -c -c -r1.205 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml	16 May 2008 16:59:05 -0000	1.205
--- doc/src/sgml/ref/psql-ref.sgml	16 May 2008 17:06:38 -0000
***************
*** 571,583 ****
      the string <literal>=&gt;</literal>. For example:
  <programlisting>
  $ <userinput>psql testdb</userinput>
! Welcome to psql &version;, the PostgreSQL interactive terminal.
  
! Type:  \copyright for distribution terms
!        \h for help with SQL commands
!        \? for help with psql commands
!        \g or terminate with semicolon to execute query
!        \q to quit
  
  testdb=&gt;
  </programlisting>
--- 571,580 ----
      the string <literal>=&gt;</literal>. For example:
  <programlisting>
  $ <userinput>psql testdb</userinput>
! psql (&version;)
! Type "help" for help.
  
! test=>
  
  testdb=&gt;
  </programlisting>
Index: src/bin/psql/help.c
===================================================================
RCS file: /cvsroot/pgsql/src/bin/psql/help.c,v
retrieving revision 1.127
diff -c -c -r1.127 help.c
*** src/bin/psql/help.c	14 May 2008 15:30:22 -0000	1.127
--- src/bin/psql/help.c	16 May 2008 17:06:39 -0000
***************
*** 170,182 ****
  	 */
  	fprintf(output, _("General\n"));
  	fprintf(output, _("  \\copyright     show PostgreSQL usage and distribution terms\n"));
  	fprintf(output, _("  \\h [NAME]      help on syntax of SQL commands, * for all commands\n"));
  	fprintf(output, _("  \\q             quit psql\n"));
  	fprintf(output, "\n");
  
  	fprintf(output, _("Query Buffer\n"));
  	fprintf(output, _("  \\e [FILE]      edit the query buffer (or file) with external editor\n"));
- 	fprintf(output, _("  \\g [FILE]      send query buffer to server (and results to file or |pipe)\n"));
  	fprintf(output, _("  \\p             show the contents of the query buffer\n"));
  	fprintf(output, _("  \\r             reset (clear) the query buffer\n"));
  #ifdef USE_READLINE
--- 170,182 ----
  	 */
  	fprintf(output, _("General\n"));
  	fprintf(output, _("  \\copyright     show PostgreSQL usage and distribution terms\n"));
+ 	fprintf(output, _("  \\g [FILE] or ; execute query (and send results to file or |pipe)\n"));
  	fprintf(output, _("  \\h [NAME]      help on syntax of SQL commands, * for all commands\n"));
  	fprintf(output, _("  \\q             quit psql\n"));
  	fprintf(output, "\n");
  
  	fprintf(output, _("Query Buffer\n"));
  	fprintf(output, _("  \\e [FILE]      edit the query buffer (or file) with external editor\n"));
  	fprintf(output, _("  \\p             show the contents of the query buffer\n"));
  	fprintf(output, _("  \\r             reset (clear) the query buffer\n"));
  #ifdef USE_READLINE
Index: src/bin/psql/mainloop.c
===================================================================
RCS file: /cvsroot/pgsql/src/bin/psql/mainloop.c,v
retrieving revision 1.90
diff -c -c -r1.90 mainloop.c
*** src/bin/psql/mainloop.c	5 Apr 2008 03:40:15 -0000	1.90
--- src/bin/psql/mainloop.c	16 May 2008 17:06:39 -0000
***************
*** 177,186 ****
  			(line[4] == '\0' || line[4] == ';' || isspace((unsigned char) line[4])))
  		{
  			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 \\h for SQL command help."));
! 			puts(_("Use \\q to quit."));
  			fflush(stdout);
  			continue;
  		}
--- 177,189 ----
  			(line[4] == '\0' || line[4] == ';' || isspace((unsigned char) line[4])))
  		{
  			free(line);
! 			puts(_("\nYou are using psql, the command-line interface to PostgreSQL."));
! 			puts(_("\t\\? for psql help"));
! 			puts(_("\t\\h or \\help for SQL help\n"));
! 			puts(_("\t\\g or \";\" to execute a query"));
! 			puts(_("\t\\q to quit psql\n"));
! 			puts(_("\t\\copyright to view the copyright\n"));
! 
  			fflush(stdout);
  			continue;
  		}
Index: src/bin/psql/startup.c
===================================================================
RCS file: /cvsroot/pgsql/src/bin/psql/startup.c,v
retrieving revision 1.147
diff -c -c -r1.147 startup.c
*** src/bin/psql/startup.c	8 May 2008 17:04:26 -0000	1.147
--- src/bin/psql/startup.c	16 May 2008 17:06:39 -0000
***************
*** 317,349 ****
  					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();
- #endif
  #ifdef WIN32
  			checkWin32Codepage();
  #endif
  		}
  
  		if (!pset.notty)
--- 317,342 ----
  					server_version = server_ver_str;
  				}
  
! 				printf(_("%s (%s, server %s)\n"), 
! 				pset.progname, PG_VERSION, server_version);
  			}
  			else
! 				printf("%s (%s)\n", pset.progname, PG_VERSION);
  
  			if (pset.sversion / 100 != client_ver / 100)
! 				printf(_("WARNING: %s version %d.%d, server version %d.%d.\n"
! 					 "         Some psql features might not work.\n"),
! 					pset.progname, client_ver / 10000, (client_ver / 100) % 100,
! 					pset.sversion / 10000, (pset.sversion / 100) % 100);
  
  #ifdef WIN32
  			checkWin32Codepage();
  #endif
+ #ifdef USE_SSL
+ 			printSSLInfo();
+ #endif
+ 
+ 			printf(_("Type \"help\" for help.\n\n"));
  		}
  
  		if (!pset.notty)
***************
*** 707,713 ****
  		return;					/* no SSL */
  
  	SSL_get_cipher_bits(ssl, &sslbits);
! 	printf(_("SSL connection (cipher: %s, bits: %i)\n\n"),
  		   SSL_get_cipher(ssl), sslbits);
  }
  #endif
--- 700,706 ----
  		return;					/* no SSL */
  
  	SSL_get_cipher_bits(ssl, &sslbits);
! 	printf(_("SSL connection (cipher: %s, bits: %i)\n"),
  		   SSL_get_cipher(ssl), sslbits);
  }
  #endif
***************
*** 729,737 ****
  	concp = GetConsoleCP();
  	if (wincp != concp)
  	{
! 		printf(_("Warning: Console code page (%u) differs from Windows code page (%u)\n"
  				 "         8-bit characters might not work correctly. See psql reference\n"
! 			   "         page \"Notes for Windows users\" for details.\n\n"),
  			   concp, wincp);
  	}
  }
--- 722,730 ----
  	concp = GetConsoleCP();
  	if (wincp != concp)
  	{
! 		printf(_("WARNING: Console code page (%u) differs from Windows code page (%u)\n"
  				 "         8-bit characters might not work correctly. See psql reference\n"
! 			     "         page \"Notes for Windows users\" for details.\n"),
  			   concp, wincp);
  	}
  }
-- 
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