Skip to content

Commit dcf516c

Browse files
committed
check if ptrack_version == 1.3
1 parent 6dc3c29 commit dcf516c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/backup.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,16 +1063,23 @@ pg_ptrack_support(void)
10631063
PGresult *res_db;
10641064

10651065
res_db = pgut_execute(backup_conn,
1066-
"SELECT proname FROM pg_proc WHERE proname='pg_ptrack_clear'",
1066+
"SELECT ptrack_version()",
10671067
0, NULL);
10681068

10691069
if (PQntuples(res_db) == 0)
10701070
{
10711071
PQclear(res_db);
10721072
return false;
10731073
}
1074-
PQclear(res_db);
10751074

1075+
/* Now we support only ptrack version 1.3 */
1076+
if (strcmp(PQgetvalue(res_db, 0, 0), "1.3") != 0)
1077+
{
1078+
PQclear(res_db);
1079+
return false;
1080+
}
1081+
1082+
PQclear(res_db);
10761083
return true;
10771084
}
10781085

0 commit comments

Comments
 (0)