Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
b6f0ad4b
Commit
b6f0ad4b
authored
17 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Have psql command 'help' suggest the use of \?, updated version.
Greg Sabino Mullane
parent
dc565af4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/bin/psql/help.c
+1
-2
1 addition, 2 deletions
src/bin/psql/help.c
src/bin/psql/mainloop.c
+6
-4
6 additions, 4 deletions
src/bin/psql/mainloop.c
with
7 additions
and
6 deletions
src/bin/psql/help.c
+
1
−
2
View file @
b6f0ad4b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
*
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.12
5
2008/04/04 1
7:42:43
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.12
6
2008/04/04 1
8:00:25
momjian Exp $
*/
*/
#include
"postgres_fe.h"
#include
"postgres_fe.h"
...
@@ -188,7 +188,6 @@ slashUsage(unsigned short int pager)
...
@@ -188,7 +188,6 @@ slashUsage(unsigned short int pager)
ON
(
pset
.
timing
));
ON
(
pset
.
timing
));
fprintf
(
output
,
_
(
"
\\
unset NAME unset (delete) internal variable
\n
"
));
fprintf
(
output
,
_
(
"
\\
unset NAME unset (delete) internal variable
\n
"
));
fprintf
(
output
,
_
(
"
\\
! [COMMAND] execute command in shell or start interactive shell
\n
"
));
fprintf
(
output
,
_
(
"
\\
! [COMMAND] execute command in shell or start interactive shell
\n
"
));
fprintf
(
output
,
_
(
"
\\
? display this help output
\n
"
));
fprintf
(
output
,
"
\n
"
);
fprintf
(
output
,
"
\n
"
);
fprintf
(
output
,
_
(
"Query Buffer
\n
"
));
fprintf
(
output
,
_
(
"Query Buffer
\n
"
));
...
...
This diff is collapsed.
Click to expand it.
src/bin/psql/mainloop.c
+
6
−
4
View file @
b6f0ad4b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
*
* $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.8
8
2008/04/04 1
7:42:43
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.8
9
2008/04/04 1
8:00:25
momjian Exp $
*/
*/
#include
"postgres_fe.h"
#include
"postgres_fe.h"
#include
"mainloop.h"
#include
"mainloop.h"
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
#include
"command.h"
#include
"command.h"
#include
"common.h"
#include
"common.h"
#include
"help.h"
#include
"input.h"
#include
"input.h"
#include
"settings.h"
#include
"settings.h"
...
@@ -172,13 +171,16 @@ MainLoop(FILE *source)
...
@@ -172,13 +171,16 @@ MainLoop(FILE *source)
continue
;
continue
;
}
}
/* A request for help? Be friendly and
show
them
the slash way of doing things
*/
/* A request for help? Be friendly and
give
them
some guidance
*/
if
(
pset
.
cur_cmd_interactive
&&
query_buf
->
len
==
0
&&
if
(
pset
.
cur_cmd_interactive
&&
query_buf
->
len
==
0
&&
pg_strncasecmp
(
line
,
"help"
,
4
)
==
0
&&
pg_strncasecmp
(
line
,
"help"
,
4
)
==
0
&&
(
line
[
4
]
==
'\0'
||
line
[
4
]
==
';'
||
isspace
(
line
[
4
])))
(
line
[
4
]
==
'\0'
||
line
[
4
]
==
';'
||
isspace
(
line
[
4
])))
{
{
free
(
line
);
free
(
line
);
slashUsage
(
pset
.
popt
.
topt
.
pager
);
puts
(
"You are using psql, the command-line interface to PostgreSQL."
);
puts
(
"Enter SQL commands, or type
\\
? for a list of backslash options."
);
puts
(
"Use
\\
h for SQL command help."
);
puts
(
"Use
\\
q to quit."
);
continue
;
continue
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment