5.1.0适配dolphin插件升级到2.0.0
This commit is contained in:
@ -111,16 +111,22 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/contrib/dolphin)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin.control
|
||||
DESTINATION share/postgresql/extension/
|
||||
)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--1.1.sql
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--2.0.sql
|
||||
DESTINATION share/postgresql/extension/
|
||||
)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--1.0.sql
|
||||
DESTINATION share/postgresql/extension/
|
||||
)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/upgrade_script/dolphin--1.0--1.1.sql
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--1.0--2.0.sql
|
||||
DESTINATION share/postgresql/extension/
|
||||
)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/rollback_script/dolphin--1.1--1.0.sql
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--2.0--1.0.sql
|
||||
DESTINATION share/postgresql/extension/
|
||||
)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--1.1--2.0.sql
|
||||
DESTINATION share/postgresql/extension/
|
||||
)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--2.0--1.1.sql
|
||||
DESTINATION share/postgresql/extension/
|
||||
)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/openGauss_expr_dolphin.ir
|
||||
|
||||
@ -33,10 +33,12 @@
|
||||
./share/postgresql/extension/security_plugin.control
|
||||
./share/postgresql/extension/security_plugin--1.0.sql
|
||||
./share/postgresql/extension/dolphin.control
|
||||
./share/postgresql/extension/dolphin--1.1.sql
|
||||
./share/postgresql/extension/dolphin--2.0.sql
|
||||
./share/postgresql/extension/dolphin--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.0--1.1.sql
|
||||
./share/postgresql/extension/dolphin--1.1--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.0--2.0.sql
|
||||
./share/postgresql/extension/dolphin--2.0--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.1--2.0.sql
|
||||
./share/postgresql/extension/dolphin--2.0--1.1.sql
|
||||
./share/postgresql/extension/openGauss_expr_dolphin.ir
|
||||
./share/postgresql/extension/file_fdw--1.0.sql
|
||||
./share/postgresql/extension/plpgsql.control
|
||||
|
||||
@ -69,10 +69,12 @@
|
||||
./share/postgresql/extension/ndpplugin.control
|
||||
./share/postgresql/extension/ndpplugin--1.0.sql
|
||||
./share/postgresql/extension/dolphin.control
|
||||
./share/postgresql/extension/dolphin--2.0.sql
|
||||
./share/postgresql/extension/dolphin--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.1.sql
|
||||
./share/postgresql/extension/dolphin--1.0--1.1.sql
|
||||
./share/postgresql/extension/dolphin--1.1--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.0--2.0.sql
|
||||
./share/postgresql/extension/dolphin--2.0--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.1--2.0.sql
|
||||
./share/postgresql/extension/dolphin--2.0--1.1.sql
|
||||
./share/postgresql/extension/openGauss_expr_dolphin.ir
|
||||
./share/postgresql/extension/file_fdw--1.0.sql
|
||||
./share/postgresql/extension/plpgsql.control
|
||||
|
||||
@ -61,10 +61,12 @@
|
||||
./share/postgresql/extension/security_plugin.control
|
||||
./share/postgresql/extension/security_plugin--1.0.sql
|
||||
./share/postgresql/extension/dolphin.control
|
||||
./share/postgresql/extension/dolphin--2.0.sql
|
||||
./share/postgresql/extension/dolphin--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.1.sql
|
||||
./share/postgresql/extension/dolphin--1.0--1.1.sql
|
||||
./share/postgresql/extension/dolphin--1.1--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.0--2.0.sql
|
||||
./share/postgresql/extension/dolphin--2.0--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.1--2.0.sql
|
||||
./share/postgresql/extension/dolphin--2.0--1.1.sql
|
||||
./share/postgresql/extension/openGauss_expr_dolphin.ir
|
||||
./share/postgresql/extension/file_fdw--1.0.sql
|
||||
./share/postgresql/extension/plpgsql.control
|
||||
|
||||
@ -33,10 +33,12 @@
|
||||
./share/postgresql/extension/security_plugin.control
|
||||
./share/postgresql/extension/security_plugin--1.0.sql
|
||||
./share/postgresql/extension/dolphin.control
|
||||
./share/postgresql/extension/dolphin--1.1.sql
|
||||
./share/postgresql/extension/dolphin--2.0.sql
|
||||
./share/postgresql/extension/dolphin--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.0--1.1.sql
|
||||
./share/postgresql/extension/dolphin--1.1--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.0--2.0.sql
|
||||
./share/postgresql/extension/dolphin--2.0--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.1--2.0.sql
|
||||
./share/postgresql/extension/dolphin--2.0--1.1.sql
|
||||
./share/postgresql/extension/openGauss_expr_dolphin.ir
|
||||
./share/postgresql/extension/file_fdw--1.0.sql
|
||||
./share/postgresql/extension/plpgsql.control
|
||||
|
||||
@ -69,10 +69,12 @@
|
||||
./share/postgresql/extension/ndpplugin.control
|
||||
./share/postgresql/extension/ndpplugin--1.0.sql
|
||||
./share/postgresql/extension/dolphin.control
|
||||
./share/postgresql/extension/dolphin--2.0.sql
|
||||
./share/postgresql/extension/dolphin--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.1.sql
|
||||
./share/postgresql/extension/dolphin--1.0--1.1.sql
|
||||
./share/postgresql/extension/dolphin--1.1--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.0--2.0.sql
|
||||
./share/postgresql/extension/dolphin--2.0--1.0.sql
|
||||
./share/postgresql/extension/dolphin--1.1--2.0.sql
|
||||
./share/postgresql/extension/dolphin--2.0--1.1.sql
|
||||
./share/postgresql/extension/openGauss_expr_dolphin.ir
|
||||
./share/postgresql/extension/file_fdw--1.0.sql
|
||||
./share/postgresql/extension/plpgsql.control
|
||||
|
||||
@ -2,10 +2,47 @@ do $$
|
||||
DECLARE
|
||||
ans boolean;
|
||||
BEGIN
|
||||
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin' and extversion = '1.1')
|
||||
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin')
|
||||
LOOP
|
||||
if ans = true then
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.0';
|
||||
if working_version_num() < 92850 then
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.0';
|
||||
elseif working_version_num() = 92850 then
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.1';
|
||||
else
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.9';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.8';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.7';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.6';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.5';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.4';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.3';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.2';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
end if;
|
||||
end if;
|
||||
exit;
|
||||
END LOOP;
|
||||
|
||||
@ -2,10 +2,47 @@ do $$
|
||||
DECLARE
|
||||
ans boolean;
|
||||
BEGIN
|
||||
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin' and extversion = '1.1')
|
||||
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin')
|
||||
LOOP
|
||||
if ans = true then
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.0';
|
||||
if working_version_num() < 92850 then
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.0';
|
||||
elseif working_version_num() = 92850 then
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.1';
|
||||
else
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.9';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.8';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.7';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.6';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.5';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.4';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.3';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
BEGIN
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.2';
|
||||
EXCEPTION WHEN invalid_parameter_value THEN
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
end if;
|
||||
end if;
|
||||
exit;
|
||||
END LOOP;
|
||||
|
||||
@ -2,10 +2,10 @@ do $$
|
||||
DECLARE
|
||||
ans boolean;
|
||||
BEGIN
|
||||
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin' and extversion = '1.0')
|
||||
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin')
|
||||
LOOP
|
||||
if ans = true then
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.1';
|
||||
ALTER EXTENSION dolphin UPDATE TO '2.0';
|
||||
end if;
|
||||
exit;
|
||||
END LOOP;
|
||||
|
||||
@ -2,10 +2,10 @@ do $$
|
||||
DECLARE
|
||||
ans boolean;
|
||||
BEGIN
|
||||
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin' and extversion = '1.0')
|
||||
for ans in select case when count(*)=1 then true else false end as ans from (select extname from pg_extension where extname='dolphin')
|
||||
LOOP
|
||||
if ans = true then
|
||||
ALTER EXTENSION dolphin UPDATE TO '1.1';
|
||||
ALTER EXTENSION dolphin UPDATE TO '2.0';
|
||||
end if;
|
||||
exit;
|
||||
END LOOP;
|
||||
|
||||
Reference in New Issue
Block a user