]> granicus.if.org Git - postgresql/commitdiff
psql prints its version number in its startup message, per recent
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 10 Aug 2002 19:35:01 +0000 (19:35 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 10 Aug 2002 19:35:01 +0000 (19:35 +0000)
discussion.  Also, cause the \timing command to display time in a
format consistent with the backend's EXPLAIN ANALYZE output.

doc/src/sgml/manage.sgml
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/start.sgml
src/bin/psql/common.c
src/bin/psql/help.c
src/bin/psql/startup.c

index 43dd8d5a955756b6316c8ced6c9c43f708a1338b..786adb71965adb00e0b76311ce86cfbdd76010d2 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.21 2002/01/20 22:19:56 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.22 2002/08/10 19:35:00 tgl Exp $
 -->
 
  <Chapter Id="manage">
@@ -130,7 +130,7 @@ to try out the examples in this manual.
 
      You will be greeted with the following message:
 <ProgramListing>
-Welcome to psql, the PostgreSQL interactive terminal.
+Welcome to psql &version;, the PostgreSQL interactive terminal.
  
 Type:  \copyright for distribution terms
        \h for help with SQL commands
index 48370d1e2146c720d22985989ee268a65939d8d6..4ddc70d212024da0aee7d5b87e63448edf285be3 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.70 2002/08/10 03:56:23 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.71 2002/08/10 19:35:00 tgl Exp $
 PostgreSQL documentation
 -->
 
@@ -488,7 +488,7 @@ PostgreSQL documentation
     the string <literal>=&gt;</literal>. For example,
 <programlisting>
 $ <userinput>psql testdb</userinput>
-Welcome to psql, the PostgreSQL interactive terminal.
+Welcome to psql &version;, the PostgreSQL interactive terminal.
 
 Type:  \copyright for distribution terms
        \h for help with SQL commands
@@ -1582,7 +1582,7 @@ lo_import 152801
        <term><literal>\timing</literal></term>
         <listitem>
         <para>
-         Toggles a display of how long each query takes in seconds.
+         Toggles a display of how long each query takes, in milliseconds.
         </para>
        </listitem>
       </varlistentry>
index 439f65e98f0cd22434f4529279cb0efed6bcdf84..a1adb712ce1cba876e92d4fa1f3aa52a83504ba6 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.22 2002/01/20 22:19:56 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.23 2002/08/10 19:35:00 tgl Exp $
 -->
 
  <chapter id="tutorial-start">
@@ -313,7 +313,7 @@ createdb: database creation failed
     In <command>psql</command>, you will be greeted with the following
     message:
 <screen>
-Welcome to psql, the PostgreSQL interactive terminal.
+Welcome to psql &version;, the PostgreSQL interactive terminal.
  
 Type:  \copyright for distribution terms
        \h for help with SQL commands
index 1b1e462660995fd3dfdd3686ab8c6bfb94a14408..9362886c4ce8ac214dfb7727840fd2237e813f90 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.41 2002/07/06 20:12:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.42 2002/08/10 19:35:00 tgl Exp $
  */
 #include "postgres_fe.h"
 
@@ -466,7 +466,8 @@ SendQuery(const char *query)
 
        /* Possible microtiming output */
        if (pset.timing && success)
-               printf(gettext("Total time: %.3fs\n"), ((after.tv_sec-before.tv_sec)*1000000 + after.tv_usec - before.tv_usec) / 1000000.0);
+               printf(gettext("Total time: %.2f msec\n"),
+                          ((after.tv_sec-before.tv_sec)*1000000 + after.tv_usec - before.tv_usec) / 1000.0);
 
        return success;
 }
index 02d760397525103a2ba2caf8ae6e15973e57fdc6..4e00c5e7d1c62e088960ca2584b6de28b1cfb664 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.53 2002/08/10 16:57:32 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.54 2002/08/10 19:35:01 tgl Exp $
  */
 #include "postgres_fe.h"
 #include "print.h"
@@ -80,7 +80,8 @@ usage(void)
        }
 
 /* If this " is the start of the string then it ought to end there to fit in 80 columns >> " */
-       puts(_("This is psql, the PostgreSQL interactive terminal.\n"));
+       printf(_("This is psql %s, the PostgreSQL interactive terminal.\n"),
+                  PG_VERSION);
        puts(_("Usage:"));
        puts(_("  psql [options] [dbname [username]]\n"));
        puts(_("Options:"));
index 5f6447c79fe5cd821eb7676526a301fa80ffdd47..ed734ec5a197ea44492c1f9a314c5d3a74119edd 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.61 2002/07/15 22:48:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.62 2002/08/10 19:35:01 tgl Exp $
  */
 #include "postgres_fe.h"
 
@@ -281,13 +281,13 @@ main(int argc, char *argv[])
                pset.issuper = test_superuser(PQuser(pset.db));
                if (!QUIET() && !pset.notty)
                {
-                       printf(gettext("Welcome to %s, the PostgreSQL interactive terminal.\n\n"
+                       printf(gettext("Welcome to %s %s, the PostgreSQL interactive terminal.\n\n"
                                                   "Type:  \\copyright for distribution terms\n"
                                                   "       \\h for help with SQL commands\n"
                                           "       \\? for help on internal slash commands\n"
                          "       \\g or terminate with semicolon to execute query\n"
                                                   "       \\q to quit\n\n"),
-                                  pset.progname);
+                                  pset.progname, PG_VERSION);
 #ifdef USE_SSL
                        printSSLInfo();
 #endif