Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
e7b90c52
Commit
e7b90c52
authored
Aug 22, 2015
by
Heikki Linnakangas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add hint to run "pgbench -i", if test tables don't exist.
Fabien Coelho, reviewed by Julien Rouhaud
parent
6e5d9f27
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
src/bin/pgbench/pgbench.c
src/bin/pgbench/pgbench.c
+9
-0
No files found.
src/bin/pgbench/pgbench.c
View file @
e7b90c52
...
@@ -55,6 +55,8 @@
...
@@ -55,6 +55,8 @@
#include "pgbench.h"
#include "pgbench.h"
#define ERRCODE_UNDEFINED_TABLE "42P01"
/*
/*
* Multi-platform pthread implementations
* Multi-platform pthread implementations
*/
*/
...
@@ -3252,7 +3254,14 @@ main(int argc, char **argv)
...
@@ -3252,7 +3254,14 @@ main(int argc, char **argv)
res
=
PQexec
(
con
,
"select count(*) from pgbench_branches"
);
res
=
PQexec
(
con
,
"select count(*) from pgbench_branches"
);
if
(
PQresultStatus
(
res
)
!=
PGRES_TUPLES_OK
)
if
(
PQresultStatus
(
res
)
!=
PGRES_TUPLES_OK
)
{
{
char
*
sqlState
=
PQresultErrorField
(
res
,
PG_DIAG_SQLSTATE
);
fprintf
(
stderr
,
"%s"
,
PQerrorMessage
(
con
));
fprintf
(
stderr
,
"%s"
,
PQerrorMessage
(
con
));
if
(
sqlState
&&
strcmp
(
sqlState
,
ERRCODE_UNDEFINED_TABLE
)
==
0
)
{
fprintf
(
stderr
,
"Perhaps you need to do initialization (
\"
pgbench -i
\"
) in database
\"
%s
\"\n
"
,
PQdb
(
con
));
}
exit
(
1
);
exit
(
1
);
}
}
scale
=
atoi
(
PQgetvalue
(
res
,
0
,
0
));
scale
=
atoi
(
PQgetvalue
(
res
,
0
,
0
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment