Package: pgadmin3
Version: 1.22.2-1
----- Forwarded message from Bernhard Rieder <[email protected]> -----
Date: Wed, 11 Oct 2017 16:10:53 +0200
From: Bernhard Rieder <[email protected]>
To: [email protected]
Subject: pgadmin3 anpassungen für PG10
diff -ur pgadmin3-1.22.2/pgadmin/include/pgAdmin3.h pgadmin3-1.22.2-PG10/pgadmin/include/pgAdmin3.h
--- pgadmin3-1.22.2/pgadmin/include/pgAdmin3.h 2016-11-10 15:13:28.000000000 +0100
+++ pgadmin3-1.22.2-PG10/pgadmin/include/pgAdmin3.h 2017-10-11 14:40:38.835409091 +0200
@@ -58,8 +58,8 @@
// Supported server minimum and maximum values.
const short SERVER_MIN_VERSION_N = 0x0804;
const wxString SERVER_MIN_VERSION_T = wxT("8.4");
-const short SERVER_MAX_VERSION_N = 0x0906;
-const wxString SERVER_MAX_VERSION_T = wxT("9.6");
+const short SERVER_MAX_VERSION_N = 0x0A00;
+const wxString SERVER_MAX_VERSION_T = wxT("10.0");
// Supported Greenplum Database and Greenplum HAWQ minimum and maximum values.
const short GP_MIN_VERSION_N = 0x0802;
diff -ur pgadmin3-1.22.2/pgadmin/schema/pgServer.cpp pgadmin3-1.22.2-PG10/pgadmin/schema/pgServer.cpp
--- pgadmin3-1.22.2/pgadmin/schema/pgServer.cpp 2016-02-08 11:25:13.000000000 +0100
+++ pgadmin3-1.22.2-PG10/pgadmin/schema/pgServer.cpp 2017-10-11 14:55:57.274751845 +0200
@@ -905,13 +905,24 @@
if (conn->BackendMinimumVersion(8, 5))
{
sql += wxT(", CASE WHEN usesuper THEN pg_is_in_recovery() ELSE NULL END as inrecovery");
- sql += wxT(", CASE WHEN usesuper THEN pg_last_xlog_receive_location() ELSE NULL END as receiveloc");
- sql += wxT(", CASE WHEN usesuper THEN pg_last_xlog_replay_location() ELSE NULL END as replayloc");
+ if (conn->BackendMinimumVersion(10, 0))
+ {
+ sql += wxT(", CASE WHEN usesuper THEN pg_last_wal_receive_lsn() ELSE NULL END as receiveloc");
+ sql += wxT(", CASE WHEN usesuper THEN pg_last_wal_replay_lsn() ELSE NULL END as replayloc");
+ }
+ else
+ {
+ sql += wxT(", CASE WHEN usesuper THEN pg_last_xlog_receive_location() ELSE NULL END as receiveloc");
+ sql += wxT(", CASE WHEN usesuper THEN pg_last_xlog_replay_location() ELSE NULL END as replayloc");
+ }
}
if (conn->BackendMinimumVersion(9, 1))
{
sql += wxT(", CASE WHEN usesuper THEN pg_last_xact_replay_timestamp() ELSE NULL END as replay_timestamp");
- sql += wxT(", CASE WHEN usesuper AND pg_is_in_recovery() THEN pg_is_xlog_replay_paused() ELSE NULL END as isreplaypaused");
+ if (conn->BackendMinimumVersion(10, 0))
+ sql += wxT(", CASE WHEN usesuper AND pg_is_in_recovery() THEN pg_is_wal_replay_paused() ELSE NULL END as isreplaypaused");
+ else
+ sql += wxT(", CASE WHEN usesuper AND pg_is_in_recovery() THEN pg_is_xlog_replay_paused() ELSE NULL END as isreplaypaused");
}
pgSet *set = ExecuteSet(sql + wxT("\n FROM pg_user WHERE usename=current_user"));
@@ -1434,7 +1445,11 @@
bool pgServer::PauseReplay()
{
SetReplayPaused(true);
- wxString sql = wxT("SELECT pg_xlog_replay_pause()");
+ wxString sql;
+ if (conn->BackendMinimumVersion(10, 0))
+ sql = wxT("SELECT pg_wal_replay_pause()");
+ else
+ sql = wxT("SELECT pg_xlog_replay_pause()");
return conn->ExecuteVoid(sql);
}
@@ -1442,7 +1457,11 @@
bool pgServer::ResumeReplay()
{
SetReplayPaused(false);
- wxString sql = wxT("SELECT pg_xlog_replay_resume()");
+ wxString sql;
+ if (conn->BackendMinimumVersion(10, 0))
+ sql = wxT("SELECT pg_wal_replay_resume()");
+ else
+ sql = wxT("SELECT pg_xlog_replay_resume()");
return conn->ExecuteVoid(sql);
}
_______________________________________________
Pkg-postgresql-public mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-postgresql-public