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

Commit881104a

Browse files
committed
Eliminate use of ExecuteSqlQueryForSingleRow, which is not in 9.1.
Hopefully, this will unbreak the buildfarm.Andres Freund
1 parent1cc4397 commit881104a

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

‎src/bin/pg_dump/pg_dump.c‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,9 +656,25 @@ main(int argc, char **argv)
656656
* When running against 9.0 or later, check if we are in recovery mode,
657657
* which means we are on a hot standby.
658658
*/
659-
if (fout->remoteVersion >=90000)
659+
if (g_fout->remoteVersion >=90000)
660660
{
661-
PGresult*res=ExecuteSqlQueryForSingleRow(fout,"SELECT pg_catalog.pg_is_in_recovery()");
661+
PGresult*res;
662+
constchar*query="SELECT pg_catalog.pg_is_in_recovery()";
663+
intntups;
664+
665+
res=PQexec(g_conn,query);
666+
check_sql_result(res,g_conn,query,PGRES_TUPLES_OK);
667+
ntups=PQntuples(res);
668+
669+
if (ntups!=1)
670+
{
671+
write_msg(NULL,ngettext("query returned %d row instead of one: %s\n",
672+
"query returned %d rows instead of one: %s\n",
673+
ntups),
674+
ntups,query);
675+
exit_nicely();
676+
}
677+
662678
if (strcmp(PQgetvalue(res,0,0),"t")==0)
663679
{
664680
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp