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
d768cb26
Commit
d768cb26
authored
21 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
seemed like a typo in one of the appendix tables
Robert Treat
parent
fdd93470
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/src/sgml/datetime.sgml
+2
-2
2 additions, 2 deletions
doc/src/sgml/datetime.sgml
src/bin/psql/help.c
+34
-4
34 additions, 4 deletions
src/bin/psql/help.c
with
36 additions
and
6 deletions
doc/src/sgml/datetime.sgml
+
2
−
2
View file @
d768cb26
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.3
4
2003/0
8/31 17:32:18 petere
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.3
5
2003/0
9/11 16:22:42 momjian
Exp $
-->
-->
<appendix id="datetime-appendix">
<appendix id="datetime-appendix">
...
@@ -344,7 +344,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.34 2003/08/31 17:32:18 pe
...
@@ -344,7 +344,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.34 2003/08/31 17:32:18 pe
</row>
</row>
<row>
<row>
<entry><literal>PM</literal></entry>
<entry><literal>PM</literal></entry>
<entry>Time is on or after
after
12:00</entry>
<entry>Time is on or after 12:00</entry>
</row>
</row>
<row>
<row>
<entry><literal>T</literal></entry>
<entry><literal>T</literal></entry>
...
...
This diff is collapsed.
Click to expand it.
src/bin/psql/help.c
+
34
−
4
View file @
d768cb26
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
*
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.7
8
2003/09/1
0 21:35:55
momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.7
9
2003/09/1
1 16:22:42
momjian Exp $
*/
*/
#include
"postgres_fe.h"
#include
"postgres_fe.h"
#include
"common.h"
#include
"common.h"
...
@@ -303,20 +303,41 @@ helpSQL(const char *topic, unsigned short int pager)
...
@@ -303,20 +303,41 @@ helpSQL(const char *topic, unsigned short int pager)
{
{
int
i
;
int
i
;
bool
help_found
=
false
;
bool
help_found
=
false
;
FILE
*
output
;
size_t
len
;
size_t
len
;
int
nl_count
=
0
;
char
*
ch
;
/* don't care about trailing spaces */
/* don't care about trailing spaces */
len
=
strlen
(
topic
);
len
=
strlen
(
topic
);
while
(
topic
[
len
-
1
]
==
' '
)
while
(
topic
[
len
-
1
]
==
' '
)
len
--
;
len
--
;
/* Count newlines for pager */
for
(
i
=
0
;
QL_HELP
[
i
].
cmd
;
i
++
)
{
if
(
strncasecmp
(
topic
,
QL_HELP
[
i
].
cmd
,
len
)
==
0
||
strcmp
(
topic
,
"*"
)
==
0
)
{
nl_count
+=
5
;
for
(
ch
=
QL_HELP
[
i
].
syntax
;
*
ch
!=
'\0'
;
ch
++
)
if
(
*
ch
==
'\n'
)
nl_count
++
;
/* If we have an exact match, exit. Fixes \h SELECT */
if
(
strcasecmp
(
topic
,
QL_HELP
[
i
].
cmd
)
==
0
)
break
;
}
}
output
=
PageOutput
(
nl_count
,
pager
);
for
(
i
=
0
;
QL_HELP
[
i
].
cmd
;
i
++
)
for
(
i
=
0
;
QL_HELP
[
i
].
cmd
;
i
++
)
{
{
if
(
strncasecmp
(
topic
,
QL_HELP
[
i
].
cmd
,
len
)
==
0
||
if
(
strncasecmp
(
topic
,
QL_HELP
[
i
].
cmd
,
len
)
==
0
||
strcmp
(
topic
,
"*"
)
==
0
)
strcmp
(
topic
,
"*"
)
==
0
)
{
{
help_found
=
true
;
help_found
=
true
;
printf
(
_
(
"Command: %s
\n
"
f
printf
(
output
,
_
(
"Command: %s
\n
"
"Description: %s
\n
"
"Description: %s
\n
"
"Syntax:
\n
%s
\n\n
"
),
"Syntax:
\n
%s
\n\n
"
),
QL_HELP
[
i
].
cmd
,
QL_HELP
[
i
].
help
,
QL_HELP
[
i
].
syntax
);
QL_HELP
[
i
].
cmd
,
QL_HELP
[
i
].
help
,
QL_HELP
[
i
].
syntax
);
...
@@ -327,7 +348,16 @@ helpSQL(const char *topic, unsigned short int pager)
...
@@ -327,7 +348,16 @@ helpSQL(const char *topic, unsigned short int pager)
}
}
if
(
!
help_found
)
if
(
!
help_found
)
printf
(
_
(
"No help available for
\"
%-.*s
\"
.
\n
Try
\\
h with no arguments to see available help.
\n
"
),
(
int
)
len
,
topic
);
fprintf
(
output
,
_
(
"No help available for
\"
%-.*s
\"
.
\n
Try
\\
h with no arguments to see available help.
\n
"
),
(
int
)
len
,
topic
);
/* Only close if we used the pager */
if
(
output
!=
stdout
)
{
pclose
(
output
);
#ifndef WIN32
pqsignal
(
SIGPIPE
,
SIG_DFL
);
#endif
}
}
}
}
}
...
...
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