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

Commit6be725e

Browse files
committed
Fix redundant error messages in client tools
A few client tools duplicate error messages already provided by libpq.Discussion:https://www.postgresql.org/message-id/flat/3e937641-88a1-e697-612e-99bba4b8e5e4%40enterprisedb.com
1 parenteed4356 commit6be725e

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

‎src/bin/pg_basebackup/streamutil.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ GetConnection(void)
200200

201201
if (PQstatus(tmpconn)!=CONNECTION_OK)
202202
{
203-
pg_log_error("could not connect to server: %s",
204-
PQerrorMessage(tmpconn));
203+
pg_log_error("%s",PQerrorMessage(tmpconn));
205204
PQfinish(tmpconn);
206205
free(values);
207206
free(keywords);

‎src/bin/pg_rewind/pg_rewind.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,7 @@ main(int argc, char **argv)
282282
conn=PQconnectdb(connstr_source);
283283

284284
if (PQstatus(conn)==CONNECTION_BAD)
285-
pg_fatal("could not connect to server: %s",
286-
PQerrorMessage(conn));
285+
pg_fatal("%s",PQerrorMessage(conn));
287286

288287
if (showprogress)
289288
pg_log_info("connected to server");

‎src/bin/psql/startup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ main(int argc, char *argv[])
295295

296296
if (PQstatus(pset.db)==CONNECTION_BAD)
297297
{
298-
pg_log_error("could not connect to server:%s",PQerrorMessage(pset.db));
298+
pg_log_error("%s",PQerrorMessage(pset.db));
299299
PQfinish(pset.db);
300300
exit(EXIT_BADCONN);
301301
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp