fix problem that rollback to 2.0.1 will contains view local_active_session

This commit is contained in:
yanghao
2022-09-28 19:48:45 +08:00
parent 341c6955f9
commit 69ccb875bd
5 changed files with 0 additions and 100 deletions

View File

@ -1,21 +1,3 @@
DO $DODO$
DECLARE
no_id boolean;
has_version_proc boolean;
need_upgrade boolean;
BEGIN
need_upgrade = false;
select case when count(*)=1 then true else false end as has_version_proc from (select * from pg_proc where proname = 'working_version_num' limit 1) into has_version_proc;
IF has_version_proc = true then
select working_version_num < 92299 or (working_version_num < 92407 and working_version_num >= 92350) as no_id from working_version_num() into no_id;
if no_id = true then
need_upgrade = true;
end if;
ELSE
need_upgrade = true;
END IF;
if need_upgrade = true then
DROP VIEW IF EXISTS pg_catalog.gs_wlm_ec_operator_statistics CASCADE;
DROP VIEW IF EXISTS pg_catalog.gs_wlm_operator_statistics CASCADE;
DROP VIEW IF EXISTS pg_catalog.pg_get_invalid_backends CASCADE;
@ -954,6 +936,3 @@ BEGIN
DROP COLUMN IF EXISTS snap_global_sessionid;
end if;
END$DO$;
end if;
END$DODO$;

View File

@ -1,16 +0,0 @@
DROP FUNCTION IF EXISTS pg_catalog.pgsysconf_pretty() CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgsysconf() CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgfadvise_willneed(regclass) CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgfadvise_dontneed(regclass) CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgfadvise_normal(regclass) CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgfadvise_sequential(regclass) CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgfadvise_random(regclass) CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgfadvise(regclass, text, int) CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgfadvise_loader(regclass, text, int, bool, bool, varbit) CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgfadvise_loader(regclass, int, bool, bool, varbit) CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgfincore(regclass) CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgfincore(regclass, bool) CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgfincore(regclass, text, bool) CASCADE;
DROP FUNCTION IF EXISTS pg_catalog.pgfincore_drawer(varbit) CASCADE;

View File

@ -1,21 +1,3 @@
DO $DODO$
DECLARE
no_id boolean;
has_version_proc boolean;
need_upgrade boolean;
BEGIN
need_upgrade = false;
select case when count(*)=1 then true else false end as has_version_proc from (select * from pg_proc where proname = 'working_version_num' limit 1) into has_version_proc;
IF has_version_proc = true then
select working_version_num < 92299 or (working_version_num < 92407 and working_version_num >= 92350) as no_id from working_version_num() into no_id;
if no_id = true then
need_upgrade = true;
end if;
ELSE
need_upgrade = true;
END IF;
if need_upgrade = true then
DROP VIEW IF EXISTS pg_catalog.gs_wlm_ec_operator_statistics CASCADE;
DROP VIEW IF EXISTS pg_catalog.gs_wlm_operator_statistics CASCADE;
DROP VIEW IF EXISTS pg_catalog.pg_get_invalid_backends CASCADE;
@ -954,6 +936,3 @@ BEGIN
DROP COLUMN IF EXISTS snap_global_sessionid;
end if;
END$DO$;
end if;
END$DODO$;

View File

@ -1,21 +1,3 @@
DO $DODO$
DECLARE
no_id boolean;
has_version_proc boolean;
need_upgrade boolean;
BEGIN
need_upgrade = false;
select case when count(*)=1 then true else false end as has_version_proc from (select * from pg_proc where proname = 'working_version_num' limit 1) into has_version_proc;
IF has_version_proc = true then
select working_version_num < 92299 or (working_version_num < 92407 and working_version_num >= 92350) as no_id from working_version_num() into no_id;
if no_id = true then
need_upgrade = true;
end if;
ELSE
need_upgrade = true;
END IF;
if need_upgrade = true then
DROP VIEW IF EXISTS pg_catalog.gs_wlm_ec_operator_statistics CASCADE;
DROP VIEW IF EXISTS pg_catalog.gs_wlm_operator_statistics CASCADE;
DROP VIEW IF EXISTS pg_catalog.pg_get_invalid_backends CASCADE;
@ -991,6 +973,3 @@ BEGIN
ADD COLUMN snap_global_sessionid text;
end if;
END$DO$;
end if;
END$DODO$;

View File

@ -1,21 +1,3 @@
DO $DODO$
DECLARE
no_id boolean;
has_version_proc boolean;
need_upgrade boolean;
BEGIN
need_upgrade = false;
select case when count(*)=1 then true else false end as has_version_proc from (select * from pg_proc where proname = 'working_version_num' limit 1) into has_version_proc;
IF has_version_proc = true then
select working_version_num < 92299 or (working_version_num < 92407 and working_version_num >= 92350) as no_id from working_version_num() into no_id;
if no_id = true then
need_upgrade = true;
end if;
ELSE
need_upgrade = true;
END IF;
if need_upgrade = true then
DROP VIEW IF EXISTS pg_catalog.gs_wlm_ec_operator_statistics CASCADE;
DROP VIEW IF EXISTS pg_catalog.gs_wlm_operator_statistics CASCADE;
DROP VIEW IF EXISTS pg_catalog.pg_get_invalid_backends CASCADE;
@ -991,6 +973,3 @@ BEGIN
ADD COLUMN snap_global_sessionid text;
end if;
END$DO$;
end if;
END$DODO$;