diff --git a/CMakeLists.txt b/CMakeLists.txt index 67bb3d20a..5aab533a3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,6 +144,12 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/contrib/dolphin) install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--2.0.1--2.0.sql DESTINATION share/postgresql/extension/ ) + install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--4.0--4.0.1.sql + DESTINATION share/postgresql/extension/ + ) + install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin--4.0.1--4.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_finance_list b/build/script/aarch64_finance_list index f8353c9a2..608f59ec6 100644 --- a/build/script/aarch64_finance_list +++ b/build/script/aarch64_finance_list @@ -86,6 +86,8 @@ ./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/dolphin--4.0--4.0.1.sql +./share/postgresql/extension/dolphin--4.0.1--4.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/aarch64_lite_list b/build/script/aarch64_lite_list index fdbd3de10..c3545e89b 100644 --- a/build/script/aarch64_lite_list +++ b/build/script/aarch64_lite_list @@ -45,6 +45,8 @@ ./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/dolphin--4.0--4.0.1.sql +./share/postgresql/extension/dolphin--4.0.1--4.0.sql ./share/postgresql/extension/openGauss_expr_dolphin.ir ./share/postgresql/extension/file_fdw--1.0.sql ./share/postgresql/extension/plpgsql.control diff --git a/build/script/aarch64_opengauss_list b/build/script/aarch64_opengauss_list index 102ad439e..c21a55896 100644 --- a/build/script/aarch64_opengauss_list +++ b/build/script/aarch64_opengauss_list @@ -89,6 +89,8 @@ ./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/dolphin--4.0--4.0.1.sql +./share/postgresql/extension/dolphin--4.0.1--4.0.sql ./share/postgresql/extension/openGauss_expr_dolphin.ir ./share/postgresql/extension/age--1.0.0.sql ./share/postgresql/extension/age.control diff --git a/build/script/opengauss_release_list_ubuntu_single b/build/script/opengauss_release_list_ubuntu_single index 0632e8e03..0f00e69f6 100644 --- a/build/script/opengauss_release_list_ubuntu_single +++ b/build/script/opengauss_release_list_ubuntu_single @@ -75,6 +75,8 @@ ./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/dolphin--4.0--4.0.1.sql +./share/postgresql/extension/dolphin--4.0.1--4.0.sql ./share/postgresql/extension/openGauss_expr_dolphin.ir ./share/postgresql/extension/age--1.0.0.sql ./share/postgresql/extension/age.control diff --git a/build/script/x86_64_finance_list b/build/script/x86_64_finance_list index b12b4ff58..899b439da 100644 --- a/build/script/x86_64_finance_list +++ b/build/script/x86_64_finance_list @@ -86,6 +86,8 @@ ./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/dolphin--4.0--4.0.1.sql +./share/postgresql/extension/dolphin--4.0.1--4.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 5a1647c2d..58cedc637 100644 --- a/build/script/x86_64_lite_list +++ b/build/script/x86_64_lite_list @@ -45,6 +45,8 @@ ./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/dolphin--4.0--4.0.1.sql +./share/postgresql/extension/dolphin--4.0.1--4.0.sql ./share/postgresql/extension/openGauss_expr_dolphin.ir ./share/postgresql/extension/file_fdw--1.0.sql ./share/postgresql/extension/plpgsql.control diff --git a/build/script/x86_64_opengauss_list b/build/script/x86_64_opengauss_list index 98b009cc7..1273cd99c 100644 --- a/build/script/x86_64_opengauss_list +++ b/build/script/x86_64_opengauss_list @@ -87,6 +87,8 @@ ./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/dolphin--4.0--4.0.1.sql +./share/postgresql/extension/dolphin--4.0.1--4.0.sql ./share/postgresql/extension/openGauss_expr_dolphin.ir ./share/postgresql/extension/age--1.0.0.sql ./share/postgresql/extension/age.control diff --git a/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_945.sql b/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_945.sql index 3aa80da32..1c5c292d3 100644 --- a/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_945.sql +++ b/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_945.sql @@ -1,3 +1,16 @@ +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.1'; + end if; + exit; + END LOOP; +END$$; + DO $DO$ DECLARE ans boolean; @@ -692,4 +705,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 '4.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_945.sql b/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_945.sql index 3aa80da32..1c5c292d3 100644 --- a/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_945.sql +++ b/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_945.sql @@ -1,3 +1,16 @@ +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.1'; + end if; + exit; + END LOOP; +END$$; + DO $DO$ DECLARE ans boolean; @@ -692,4 +705,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 '4.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_945.sql b/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_945.sql index 1f669cc58..7f7aa5580 100644 --- a/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_945.sql +++ b/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_945.sql @@ -1,3 +1,16 @@ +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.1'; + end if; + exit; + END LOOP; +END$$; + DO $DO$ DECLARE ans boolean; @@ -700,4 +713,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 '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_945.sql b/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_945.sql index 1f669cc58..7f7aa5580 100644 --- a/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_945.sql +++ b/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_945.sql @@ -1,3 +1,16 @@ +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.1'; + end if; + exit; + END LOOP; +END$$; + DO $DO$ DECLARE ans boolean; @@ -700,4 +713,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 '4.0'; + end if; + exit; + END LOOP; +END$$; \ No newline at end of file