mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Suppress psql \s help display for platforms like Win32 that don't
typically install witn readline, and throw an error if they try to access it.
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.122 2004/09/20 18:51:17 tgl Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.123 2004/10/06 18:39:15 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -1603,7 +1603,7 @@ lo_import 152801
|
|||||||
class="parameter">filename</replaceable> is omitted, the history
|
class="parameter">filename</replaceable> is omitted, the history
|
||||||
is written to the standard output. This option is only available
|
is written to the standard output. This option is only available
|
||||||
if <application>psql</application> is configured to use the
|
if <application>psql</application> is configured to use the
|
||||||
<acronym>GNU</acronym> history library.
|
<acronym>GNU</acronym> readline (or history) library.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.93 2004/08/29 05:06:54 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.94 2004/10/06 18:39:16 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
@ -194,7 +194,9 @@ slashUsage(unsigned short int pager)
|
|||||||
fprintf(output, _(" \\g [FILE] send query buffer to server (and results to file or |pipe)\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, _(" \\p show the contents of the query buffer\n"));
|
||||||
fprintf(output, _(" \\r reset (clear) the query buffer\n"));
|
fprintf(output, _(" \\r reset (clear) the query buffer\n"));
|
||||||
|
#ifdef USE_READLINE
|
||||||
fprintf(output, _(" \\s [FILE] display history or save it to file\n"));
|
fprintf(output, _(" \\s [FILE] display history or save it to file\n"));
|
||||||
|
#endif
|
||||||
fprintf(output, _(" \\w FILE write query buffer to file\n"));
|
fprintf(output, _(" \\w FILE write query buffer to file\n"));
|
||||||
fprintf(output, "\n");
|
fprintf(output, "\n");
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/input.c,v 1.38 2004/09/27 19:16:02 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/input.c,v 1.39 2004/10/06 18:39:16 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
@ -209,6 +209,8 @@ saveHistory(char *fname)
|
|||||||
|
|
||||||
psql_error("could not save history to file \"%s\": %s\n", fname, strerror(errno));
|
psql_error("could not save history to file \"%s\": %s\n", fname, strerror(errno));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
psql_error("history is not supported on this platform\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user