Add index btree check

Добавлена проверка индекса функций bt_index_parent_check(regclass,true)
Вызывается из контекстного меню.
This commit is contained in:
lsv 2020-12-05 22:09:57 +05:00
parent 21a368457a
commit b5e10e967a
5 changed files with 43 additions and 1 deletions

View file

@ -547,7 +547,7 @@ bool pgConn::HasFeature(int featureNo, bool forceCheck)
wxT(" JOIN pg_namespace n ON n.oid=pronamespace\n")
wxT(" WHERE proname IN ('pg_tablespace_size', 'pg_file_read', 'pg_logfile_rotate',")
wxT( " 'pg_postmaster_starttime', 'pg_terminate_backend', 'pg_reload_conf',")
wxT( " 'pgstattuple', 'pgstatindex')\n")
wxT( " 'pgstattuple', 'pgstatindex','bt_index_parent_check')\n")
wxT(" AND nspname IN ('pg_catalog', 'public')");
pgSet *set = ExecuteSet(sql);
@ -577,6 +577,8 @@ bool pgConn::HasFeature(int featureNo, bool forceCheck)
features[FEATURE_PGSTATTUPLE] = true;
else if (proname == wxT("pgstatindex") && pronargs == 1 && set->GetLong(wxT("arg0")) == 25)
features[FEATURE_PGSTATINDEX] = true;
else if (proname == wxT("bt_index_parent_check") && pronargs == 2 )
features[FEATURE_PGCHECKINDEX] = true;
set->MoveNext();
}