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

Commitb6f0ad4

Browse files
committed
Have psql command 'help' suggest the use of \?, updated version.
Greg Sabino Mullane
1 parentdc565af commitb6f0ad4

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

‎src/bin/psql/help.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.125 2008/04/0417:42:43 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.126 2008/04/0418:00:25 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99

@@ -188,7 +188,6 @@ slashUsage(unsigned short int pager)
188188
ON(pset.timing));
189189
fprintf(output,_(" \\unset NAME unset (delete) internal variable\n"));
190190
fprintf(output,_(" \\! [COMMAND] execute command in shell or start interactive shell\n"));
191-
fprintf(output,_(" \\? display this help output\n"));
192191
fprintf(output,"\n");
193192

194193
fprintf(output,_("Query Buffer\n"));

‎src/bin/psql/mainloop.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
*
44
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.88 2008/04/0417:42:43 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.89 2008/04/0418:00:25 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"mainloop.h"
1010

1111

1212
#include"command.h"
1313
#include"common.h"
14-
#include"help.h"
1514
#include"input.h"
1615
#include"settings.h"
1716

@@ -172,13 +171,16 @@ MainLoop(FILE *source)
172171
continue;
173172
}
174173

175-
/* A request for help? Be friendly andshow themthe slash way of doing things */
174+
/* A request for help? Be friendly andgive themsome guidance */
176175
if (pset.cur_cmd_interactive&&query_buf->len==0&&
177176
pg_strncasecmp(line,"help",4)==0&&
178177
(line[4]=='\0'||line[4]==';'||isspace(line[4])))
179178
{
180179
free(line);
181-
slashUsage(pset.popt.topt.pager);
180+
puts("You are using psql, the command-line interface to PostgreSQL.");
181+
puts("Enter SQL commands, or type \\? for a list of backslash options.");
182+
puts("Use \\h for SQL command help.");
183+
puts("Use \\q to quit.");
182184
continue;
183185
}
184186

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp