Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8be9bd8

Browse files
committed
psql prints its version number in its startup message, per recent
discussion. Also, cause the \timing command to display time in aformat consistent with the backend's EXPLAIN ANALYZE output.
1 parenta5e6e99 commit8be9bd8

File tree

6 files changed

+16
-14
lines changed

6 files changed

+16
-14
lines changed

‎doc/src/sgml/manage.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.21 2002/01/20 22:19:56 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.22 2002/08/1019:35:00 tgl Exp $
33
-->
44

55
<Chapter Id="manage">
@@ -130,7 +130,7 @@ to try out the examples in this manual.
130130

131131
You will be greeted with the following message:
132132
<ProgramListing>
133-
Welcome to psql, the PostgreSQL interactive terminal.
133+
Welcome to psql &version;, the PostgreSQL interactive terminal.
134134

135135
Type: \copyright for distribution terms
136136
\h for help with SQL commands

‎doc/src/sgml/ref/psql-ref.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.70 2002/08/1003:56:23 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.71 2002/08/1019:35:00 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -488,7 +488,7 @@ PostgreSQL documentation
488488
the string <literal>=&gt;</literal>. For example,
489489
<programlisting>
490490
$ <userinput>psql testdb</userinput>
491-
Welcome to psql, the PostgreSQL interactive terminal.
491+
Welcome to psql &version;, the PostgreSQL interactive terminal.
492492

493493
Type: \copyright for distribution terms
494494
\h for help with SQL commands
@@ -1582,7 +1582,7 @@ lo_import 152801
15821582
<term><literal>\timing</literal></term>
15831583
<listitem>
15841584
<para>
1585-
Toggles a display of how long each query takes inseconds.
1585+
Toggles a display of how long each query takes, inmilliseconds.
15861586
</para>
15871587
</listitem>
15881588
</varlistentry>

‎doc/src/sgml/start.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.22 2002/01/20 22:19:56 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.23 2002/08/1019:35:00 tgl Exp $
33
-->
44

55
<chapter id="tutorial-start">
@@ -313,7 +313,7 @@ createdb: database creation failed
313313
In <command>psql</command>, you will be greeted with the following
314314
message:
315315
<screen>
316-
Welcome to psql, the PostgreSQL interactive terminal.
316+
Welcome to psql &version;, the PostgreSQL interactive terminal.
317317

318318
Type: \copyright for distribution terms
319319
\h for help with SQL commands

‎src/bin/psql/common.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.41 2002/07/06 20:12:30 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.42 2002/08/10 19:35:00 tgl Exp $
77
*/
88
#include"postgres_fe.h"
99

@@ -466,7 +466,8 @@ SendQuery(const char *query)
466466

467467
/* Possible microtiming output */
468468
if (pset.timing&&success)
469-
printf(gettext("Total time: %.3fs\n"), ((after.tv_sec-before.tv_sec)*1000000+after.tv_usec-before.tv_usec) /1000000.0);
469+
printf(gettext("Total time: %.2f msec\n"),
470+
((after.tv_sec-before.tv_sec)*1000000+after.tv_usec-before.tv_usec) /1000.0);
470471

471472
returnsuccess;
472473
}

‎src/bin/psql/help.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.53 2002/08/1016:57:32 petere Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.54 2002/08/1019:35:01 tgl Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"print.h"
@@ -80,7 +80,8 @@ usage(void)
8080
}
8181

8282
/* If this " is the start of the string then it ought to end there to fit in 80 columns >> " */
83-
puts(_("This is psql, the PostgreSQL interactive terminal.\n"));
83+
printf(_("This is psql %s, the PostgreSQL interactive terminal.\n"),
84+
PG_VERSION);
8485
puts(_("Usage:"));
8586
puts(_(" psql [options] [dbname [username]]\n"));
8687
puts(_("Options:"));

‎src/bin/psql/startup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.61 2002/07/15 22:48:54 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.62 2002/08/10 19:35:01 tgl Exp $
77
*/
88
#include"postgres_fe.h"
99

@@ -281,13 +281,13 @@ main(int argc, char *argv[])
281281
pset.issuper=test_superuser(PQuser(pset.db));
282282
if (!QUIET()&& !pset.notty)
283283
{
284-
printf(gettext("Welcome to %s, the PostgreSQL interactive terminal.\n\n"
284+
printf(gettext("Welcome to %s %s, the PostgreSQL interactive terminal.\n\n"
285285
"Type: \\copyright for distribution terms\n"
286286
" \\h for help with SQL commands\n"
287287
" \\? for help on internal slash commands\n"
288288
" \\g or terminate with semicolon to execute query\n"
289289
" \\q to quit\n\n"),
290-
pset.progname);
290+
pset.progname,PG_VERSION);
291291
#ifdefUSE_SSL
292292
printSSLInfo();
293293
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp