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
6d0efd3a
Commit
6d0efd3a
authored
18 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Surely this temp buffer needn't be static.
parent
cbb7acfa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/bin/scripts/common.c
+6
-4
6 additions, 4 deletions
src/bin/scripts/common.c
with
6 additions
and
4 deletions
src/bin/scripts/common.c
+
6
−
4
View file @
6d0efd3a
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.2
1
2006/09/22 1
8
:5
0:41 petere
Exp $
* $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.2
2
2006/09/22 1
9
:5
1:14 tgl
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -206,14 +206,15 @@ executeCommand(PGconn *conn, const char *query,
...
@@ -206,14 +206,15 @@ executeCommand(PGconn *conn, const char *query,
bool
bool
yesno_prompt
(
const
char
*
question
)
yesno_prompt
(
const
char
*
question
)
{
{
static
char
prompt
[
128
];
char
prompt
[
256
];
for
(;;)
for
(;;)
{
{
char
*
resp
;
char
*
resp
;
/* translator: This is a question followed by the translated options for "yes" and "no". */
/* translator: This is a question followed by the translated options for "yes" and "no". */
snprintf
(
prompt
,
sizeof
(
prompt
),
_
(
"%s (%s/%s) "
),
_
(
question
),
_
(
PG_YESLETTER
),
_
(
PG_NOLETTER
));
snprintf
(
prompt
,
sizeof
(
prompt
),
_
(
"%s (%s/%s) "
),
_
(
question
),
_
(
PG_YESLETTER
),
_
(
PG_NOLETTER
));
resp
=
simple_prompt
(
prompt
,
1
,
true
);
resp
=
simple_prompt
(
prompt
,
1
,
true
);
if
(
strcmp
(
resp
,
_
(
PG_YESLETTER
))
==
0
)
if
(
strcmp
(
resp
,
_
(
PG_YESLETTER
))
==
0
)
...
@@ -221,6 +222,7 @@ yesno_prompt(const char *question)
...
@@ -221,6 +222,7 @@ yesno_prompt(const char *question)
else
if
(
strcmp
(
resp
,
_
(
PG_NOLETTER
))
==
0
)
else
if
(
strcmp
(
resp
,
_
(
PG_NOLETTER
))
==
0
)
return
false
;
return
false
;
printf
(
_
(
"Please answer
\"
%s
\"
or
\"
%s
\"
.
\n
"
),
_
(
PG_YESLETTER
),
_
(
PG_NOLETTER
));
printf
(
_
(
"Please answer
\"
%s
\"
or
\"
%s
\"
.
\n
"
),
_
(
PG_YESLETTER
),
_
(
PG_NOLETTER
));
}
}
}
}
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