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

Commitc62a546

Browse files
committed
Suppress psql \s help display for platforms like Win32 that don't
typically install witn readline, and throw an error if they try toaccess it.
1 parent94954c7 commitc62a546

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.122 2004/09/20 18:51:17 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.123 2004/10/06 18:39:15 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -1603,7 +1603,7 @@ lo_import 152801
16031603
class="parameter">filename</replaceable> is omitted, the history
16041604
is written to the standard output. This option is only available
16051605
if <application>psql</application> is configured to use the
1606-
<acronym>GNU</acronym> history library.
1606+
<acronym>GNU</acronym>readline (orhistory) library.
16071607
</para>
16081608

16091609
<note>

‎src/bin/psql/help.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.93 2004/08/29 05:06:54 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.94 2004/10/06 18:39:16 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"common.h"
@@ -194,7 +194,9 @@ slashUsage(unsigned short int pager)
194194
fprintf(output,_(" \\g [FILE] send query buffer to server (and results to file or |pipe)\n"));
195195
fprintf(output,_(" \\p show the contents of the query buffer\n"));
196196
fprintf(output,_(" \\r reset (clear) the query buffer\n"));
197+
#ifdefUSE_READLINE
197198
fprintf(output,_(" \\s [FILE] display history or save it to file\n"));
199+
#endif
198200
fprintf(output,_(" \\w FILE write query buffer to file\n"));
199201
fprintf(output,"\n");
200202

‎src/bin/psql/input.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/input.c,v 1.38 2004/09/27 19:16:02 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/input.c,v 1.39 2004/10/06 18:39:16 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"input.h"
@@ -209,6 +209,8 @@ saveHistory(char *fname)
209209

210210
psql_error("could not save history to file \"%s\": %s\n",fname,strerror(errno));
211211
}
212+
#else
213+
psql_error("history is not supported on this platform\n");
212214
#endif
213215

214216
return false;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp