From 3ca0a882e085dd0e536803901904a6df1356cb65 Mon Sep 17 00:00:00 2001 From: chenxiaobin19 <1025221611@qq.com> Date: Sat, 7 Oct 2023 15:46:55 +0800 Subject: [PATCH] dolphin300 --- CMakeLists.txt | 15 +++++++++------ build/script/aarch64_lite_list | 11 ++++++----- build/script/aarch64_opengauss_list | 13 +++++++------ build/script/opengauss_release_list_ubuntu_single | 11 +++++++---- build/script/x86_64_lite_list | 11 ++++++----- build/script/x86_64_opengauss_list | 13 +++++++------ .../rollback-post_catalog_maindb_92_914.sql | 15 ++++++++++++++- .../rollback-post_catalog_otherdb_92_914.sql | 15 ++++++++++++++- .../upgrade-post_catalog_maindb_92_914.sql | 15 ++++++++++++++- .../upgrade-post_catalog_otherdb_92_914.sql | 15 ++++++++++++++- 10 files changed, 98 insertions(+), 36 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index caa9c1f43..8d37107cd 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,16 +111,13 @@ 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--2.0.sql + install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--3.0.sql DESTINATION share/postgresql/extension/ ) - install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--1.0.sql + install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--1.0--1.1.sql DESTINATION share/postgresql/extension/ ) - install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--1.0--2.0.sql - DESTINATION share/postgresql/extension/ - ) - install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--2.0--1.0.sql + install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--1.1--1.0.sql DESTINATION share/postgresql/extension/ ) install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--1.1--2.0.sql @@ -129,6 +126,12 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/contrib/dolphin) install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--2.0--1.1.sql DESTINATION share/postgresql/extension/ ) + install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--2.0--3.0.sql + DESTINATION share/postgresql/extension/ + ) + install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--3.0--2.0.sql + DESTINATION share/postgresql/extension/ + ) install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/openGauss_expr_dolphin.ir DESTINATION share/postgresql/extension/ ) diff --git a/build/script/aarch64_lite_list b/build/script/aarch64_lite_list index 10038ccce..09832bea8 100644 --- a/build/script/aarch64_lite_list +++ b/build/script/aarch64_lite_list @@ -33,13 +33,14 @@ ./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.0--2.0.sql -./share/postgresql/extension/dolphin--2.0--1.0.sql -./share/postgresql/extension/dolphin--2.0--2.0.1.sql +./share/postgresql/extension/dolphin--3.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.1--2.0.sql ./share/postgresql/extension/dolphin--2.0--1.1.sql +./share/postgresql/extension/dolphin--2.0--3.0.sql +./share/postgresql/extension/dolphin--3.0--2.0.sql +./share/postgresql/extension/dolphin--2.0--2.0.1.sql ./share/postgresql/extension/dolphin--2.0.1--2.0.sql ./share/postgresql/extension/openGauss_expr_dolphin.ir ./share/postgresql/extension/file_fdw--1.0.sql diff --git a/build/script/aarch64_opengauss_list b/build/script/aarch64_opengauss_list index 06d078ea2..cc3c38841 100644 --- a/build/script/aarch64_opengauss_list +++ b/build/script/aarch64_opengauss_list @@ -72,16 +72,17 @@ ./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.0--2.0.sql -./share/postgresql/extension/dolphin--2.0--1.0.sql -./share/postgresql/extension/dolphin--2.0--2.0.1.sql +./share/postgresql/extension/dolphin--3.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.1--2.0.sql ./share/postgresql/extension/dolphin--2.0--1.1.sql +./share/postgresql/extension/dolphin--2.0--3.0.sql +./share/postgresql/extension/dolphin--3.0--2.0.sql +./share/postgresql/extension/dolphin--2.0--2.0.1.sql +./share/postgresql/extension/dolphin--2.0.1--2.0.sql ./share/postgresql/extension/whale.control ./share/postgresql/extension/whale--1.0.sql -./share/postgresql/extension/dolphin--2.0.1--2.0.sql ./share/postgresql/extension/openGauss_expr_dolphin.ir ./share/postgresql/extension/assessment--1.0.sql ./share/postgresql/extension/assessment.control diff --git a/build/script/opengauss_release_list_ubuntu_single b/build/script/opengauss_release_list_ubuntu_single index 4f3b8da5e..ca09d02d0 100644 --- a/build/script/opengauss_release_list_ubuntu_single +++ b/build/script/opengauss_release_list_ubuntu_single @@ -61,12 +61,15 @@ ./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.0--2.0.sql -./share/postgresql/extension/dolphin--2.0--1.0.sql +./share/postgresql/extension/dolphin--3.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.1--2.0.sql ./share/postgresql/extension/dolphin--2.0--1.1.sql +./share/postgresql/extension/dolphin--2.0--3.0.sql +./share/postgresql/extension/dolphin--3.0--2.0.sql +./share/postgresql/extension/dolphin--2.0--2.0.1.sql +./share/postgresql/extension/dolphin--2.0.1--2.0.sql ./share/postgresql/extension/whale.control ./share/postgresql/extension/whale--1.0.sql ./share/postgresql/extension/openGauss_expr_dolphin.ir diff --git a/build/script/x86_64_lite_list b/build/script/x86_64_lite_list index b49cbef71..aab3de703 100644 --- a/build/script/x86_64_lite_list +++ b/build/script/x86_64_lite_list @@ -33,13 +33,14 @@ ./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.0--2.0.sql -./share/postgresql/extension/dolphin--2.0--1.0.sql -./share/postgresql/extension/dolphin--2.0--2.0.1.sql +./share/postgresql/extension/dolphin--3.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.1--2.0.sql ./share/postgresql/extension/dolphin--2.0--1.1.sql +./share/postgresql/extension/dolphin--2.0--3.0.sql +./share/postgresql/extension/dolphin--3.0--2.0.sql +./share/postgresql/extension/dolphin--2.0--2.0.1.sql ./share/postgresql/extension/dolphin--2.0.1--2.0.sql ./share/postgresql/extension/openGauss_expr_dolphin.ir ./share/postgresql/extension/file_fdw--1.0.sql diff --git a/build/script/x86_64_opengauss_list b/build/script/x86_64_opengauss_list index 6bc6510f1..4083c32f6 100644 --- a/build/script/x86_64_opengauss_list +++ b/build/script/x86_64_opengauss_list @@ -72,16 +72,17 @@ ./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.0--2.0.sql -./share/postgresql/extension/dolphin--2.0--1.0.sql -./share/postgresql/extension/dolphin--2.0--2.0.1.sql +./share/postgresql/extension/dolphin--3.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.1--2.0.sql ./share/postgresql/extension/dolphin--2.0--1.1.sql +./share/postgresql/extension/dolphin--2.0--3.0.sql +./share/postgresql/extension/dolphin--3.0--2.0.sql +./share/postgresql/extension/dolphin--2.0--2.0.1.sql +./share/postgresql/extension/dolphin--2.0.1--2.0.sql ./share/postgresql/extension/whale.control ./share/postgresql/extension/whale--1.0.sql -./share/postgresql/extension/dolphin--2.0.1--2.0.sql ./share/postgresql/extension/openGauss_expr_dolphin.ir ./share/postgresql/extension/assessment--1.0.sql ./share/postgresql/extension/assessment.control diff --git a/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_914.sql b/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_914.sql index 99f706c2a..032e03b81 100644 --- a/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_914.sql +++ b/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_914.sql @@ -589,4 +589,17 @@ BEGIN GRANT SELECT ON TABLE DBE_PERF.statement_history TO PUBLIC; END IF; END IF; -END $DO$; \ No newline at end of file +END $DO$; + +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') + LOOP + if ans = true then + ALTER EXTENSION dolphin UPDATE TO '2.0'; + end if; + exit; + END LOOP; +END$$; \ No newline at end of file diff --git a/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_914.sql b/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_914.sql index a376f9984..f214316b1 100644 --- a/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_914.sql +++ b/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_914.sql @@ -589,4 +589,17 @@ EXECUTE IMMEDIATE querystr; GRANT SELECT ON TABLE DBE_PERF.statement_history TO PUBLIC; END IF; END IF; -END $DO$; \ No newline at end of file +END $DO$; + +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') + LOOP + if ans = true then + ALTER EXTENSION dolphin UPDATE TO '2.0'; + end if; + exit; + END LOOP; +END$$; \ No newline at end of file diff --git a/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_914.sql b/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_914.sql index c88af005c..11efd81d7 100644 --- a/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_914.sql +++ b/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_914.sql @@ -595,4 +595,17 @@ CREATE OR REPLACE FUNCTION DBE_PERF.get_global_full_sql_by_timestamp GRANT SELECT ON TABLE DBE_PERF.statement_history TO PUBLIC; END IF; END IF; -END $DO$; \ No newline at end of file +END $DO$; + +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') + LOOP + if ans = true then + ALTER EXTENSION dolphin UPDATE TO '3.0'; + end if; + exit; + END LOOP; +END$$; \ No newline at end of file diff --git a/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_914.sql b/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_914.sql index d92938f18..06518a540 100644 --- a/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_914.sql +++ b/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_914.sql @@ -595,4 +595,17 @@ EXECUTE IMMEDIATE querystr; GRANT SELECT ON TABLE DBE_PERF.statement_history TO PUBLIC; END IF; END IF; -END $DO$; \ No newline at end of file +END $DO$; + +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') + LOOP + if ans = true then + ALTER EXTENSION dolphin UPDATE TO '3.0'; + end if; + exit; + END LOOP; +END$$; \ No newline at end of file