From 25ae1230c646a449b49cdd6bbfe993f83a704473 Mon Sep 17 00:00:00 2001 From: chenxiaobin19 <1025221611@qq.com> Date: Mon, 8 Apr 2024 16:04:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=8D=87=E7=BA=A7=E5=88=B04.?= =?UTF-8?q?0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 8 +++++++- build/script/aarch64_finance_list | 4 +++- build/script/aarch64_lite_list | 4 +++- build/script/aarch64_opengauss_list | 4 +++- build/script/opengauss_release_list_ubuntu_single | 4 +++- build/script/x86_64_finance_list | 4 +++- build/script/x86_64_lite_list | 4 +++- build/script/x86_64_opengauss_list | 4 +++- src/common/backend/utils/init/globals.cpp | 2 +- .../rollback-post_catalog_maindb_92_927.sql | 12 ++++++++++++ .../rollback-post_catalog_otherdb_92_927.sql | 12 ++++++++++++ .../upgrade-post_catalog_maindb_92_927.sql | 12 ++++++++++++ .../upgrade-post_catalog_otherdb_92_927.sql | 12 ++++++++++++ 13 files changed, 77 insertions(+), 9 deletions(-) create mode 100644 src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_927.sql create mode 100644 src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_927.sql create mode 100644 src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_927.sql create mode 100644 src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_927.sql diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f5e7dbc7..67bb3d20a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,7 +111,7 @@ 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--3.0.sql + install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--4.0.sql DESTINATION share/postgresql/extension/ ) install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--1.0--1.1.sql @@ -132,6 +132,12 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/contrib/dolphin) install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--3.0--2.0.sql DESTINATION share/postgresql/extension/ ) + install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--3.0--4.0.sql + DESTINATION share/postgresql/extension/ + ) + install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--4.0--3.0.sql + DESTINATION share/postgresql/extension/ + ) install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--2.0--2.0.1.sql DESTINATION share/postgresql/extension/ ) diff --git a/build/script/aarch64_finance_list b/build/script/aarch64_finance_list index 4c76d937b..f8353c9a2 100644 --- a/build/script/aarch64_finance_list +++ b/build/script/aarch64_finance_list @@ -75,13 +75,15 @@ ./share/postgresql/extension/spqplugin.control ./share/postgresql/extension/spqplugin--1.0.sql ./share/postgresql/extension/dolphin.control -./share/postgresql/extension/dolphin--3.0.sql +./share/postgresql/extension/dolphin--4.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--3.0--4.0.sql +./share/postgresql/extension/dolphin--4.0--3.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 diff --git a/build/script/aarch64_lite_list b/build/script/aarch64_lite_list index 2a7656894..856c122f4 100644 --- a/build/script/aarch64_lite_list +++ b/build/script/aarch64_lite_list @@ -34,13 +34,15 @@ ./share/postgresql/extension/security_plugin.control ./share/postgresql/extension/security_plugin--1.0.sql ./share/postgresql/extension/dolphin.control -./share/postgresql/extension/dolphin--3.0.sql +./share/postgresql/extension/dolphin--4.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--3.0--4.0.sql +./share/postgresql/extension/dolphin--4.0--3.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 diff --git a/build/script/aarch64_opengauss_list b/build/script/aarch64_opengauss_list index 4ce2170a8..564f81b1c 100644 --- a/build/script/aarch64_opengauss_list +++ b/build/script/aarch64_opengauss_list @@ -76,13 +76,15 @@ ./share/postgresql/extension/spqplugin.control ./share/postgresql/extension/spqplugin--1.0.sql ./share/postgresql/extension/dolphin.control -./share/postgresql/extension/dolphin--3.0.sql +./share/postgresql/extension/dolphin--4.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--3.0--4.0.sql +./share/postgresql/extension/dolphin--4.0--3.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 diff --git a/build/script/opengauss_release_list_ubuntu_single b/build/script/opengauss_release_list_ubuntu_single index 96154be84..976ee8d91 100644 --- a/build/script/opengauss_release_list_ubuntu_single +++ b/build/script/opengauss_release_list_ubuntu_single @@ -62,13 +62,15 @@ ./share/postgresql/extension/security_plugin.control ./share/postgresql/extension/security_plugin--1.0.sql ./share/postgresql/extension/dolphin.control -./share/postgresql/extension/dolphin--3.0.sql +./share/postgresql/extension/dolphin--4.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--3.0--4.0.sql +./share/postgresql/extension/dolphin--4.0--3.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 diff --git a/build/script/x86_64_finance_list b/build/script/x86_64_finance_list index 4a3357316..b12b4ff58 100644 --- a/build/script/x86_64_finance_list +++ b/build/script/x86_64_finance_list @@ -75,13 +75,15 @@ ./share/postgresql/extension/spqplugin.control ./share/postgresql/extension/spqplugin--1.0.sql ./share/postgresql/extension/dolphin.control -./share/postgresql/extension/dolphin--3.0.sql +./share/postgresql/extension/dolphin--4.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--3.0--4.0.sql +./share/postgresql/extension/dolphin--4.0--3.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 diff --git a/build/script/x86_64_lite_list b/build/script/x86_64_lite_list index 31e242d5b..2143d2aa7 100644 --- a/build/script/x86_64_lite_list +++ b/build/script/x86_64_lite_list @@ -34,13 +34,15 @@ ./share/postgresql/extension/security_plugin.control ./share/postgresql/extension/security_plugin--1.0.sql ./share/postgresql/extension/dolphin.control -./share/postgresql/extension/dolphin--3.0.sql +./share/postgresql/extension/dolphin--4.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--3.0--4.0.sql +./share/postgresql/extension/dolphin--4.0--3.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 diff --git a/build/script/x86_64_opengauss_list b/build/script/x86_64_opengauss_list index 9fe973fd9..0b483633a 100644 --- a/build/script/x86_64_opengauss_list +++ b/build/script/x86_64_opengauss_list @@ -76,13 +76,15 @@ ./share/postgresql/extension/spqplugin.control ./share/postgresql/extension/spqplugin--1.0.sql ./share/postgresql/extension/dolphin.control -./share/postgresql/extension/dolphin--3.0.sql +./share/postgresql/extension/dolphin--4.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--3.0--4.0.sql +./share/postgresql/extension/dolphin--4.0--3.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 diff --git a/src/common/backend/utils/init/globals.cpp b/src/common/backend/utils/init/globals.cpp index a0fe847ec..9a3dcca7e 100644 --- a/src/common/backend/utils/init/globals.cpp +++ b/src/common/backend/utils/init/globals.cpp @@ -75,7 +75,7 @@ bool will_shutdown = false; * NEXT | 92899 | ? | ? * ********************************************/ -const uint32 GRAND_VERSION_NUM = 92926; +const uint32 GRAND_VERSION_NUM = 92927; /******************************************** * 2.VERSION NUM FOR EACH FEATURE diff --git a/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_927.sql b/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_927.sql new file mode 100644 index 000000000..186140d72 --- /dev/null +++ b/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_927.sql @@ -0,0 +1,12 @@ +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/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_927.sql b/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_927.sql new file mode 100644 index 000000000..186140d72 --- /dev/null +++ b/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_927.sql @@ -0,0 +1,12 @@ +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_maindb/upgrade-post_catalog_maindb_92_927.sql b/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_927.sql new file mode 100644 index 000000000..cf2c7b297 --- /dev/null +++ b/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_927.sql @@ -0,0 +1,12 @@ +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 '4.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_927.sql b/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_927.sql new file mode 100644 index 000000000..cf2c7b297 --- /dev/null +++ b/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_927.sql @@ -0,0 +1,12 @@ +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 '4.0'; + end if; + exit; + END LOOP; +END$$; \ No newline at end of file