-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sumit Jaiswal <[email protected]>
- Loading branch information
Sumit Jaiswal
committed
Oct 25, 2023
1 parent
77c9e13
commit 03cd14a
Showing
8 changed files
with
108 additions
and
93 deletions.
There are no files selected for viewing
21 changes: 4 additions & 17 deletions
21
test/JDBC/expected/AUTO_ANALYZE-before-15-5-or-14-10-vu-prepare.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 27 additions & 7 deletions
34
test/JDBC/expected/AUTO_ANALYZE-before-15-5-or-14-10-vu-verify.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,35 @@ | ||
|
||
-- list all the babelfish catalogs that has not been analyzed manually after upgrade | ||
-- will return null | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
-- list all the babel catalogs that has not been analyzed manually during extension upgrade | ||
-- will return NULL in this case | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL order by relname | ||
GO | ||
~~START~~ | ||
varchar | ||
~~END~~ | ||
|
||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed | ||
GO | ||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed | ||
GO | ||
-- list all the babel catalogs that has been analyzed manually during extension upgrade | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL order by relname | ||
Go | ||
~~START~~ | ||
varchar | ||
assemblies | ||
babelfish_authid_login_ext | ||
babelfish_authid_user_ext | ||
babelfish_configurations | ||
babelfish_domain_mapping | ||
babelfish_extended_properties | ||
babelfish_function_ext | ||
babelfish_helpcollation | ||
babelfish_namespace_ext | ||
babelfish_schema_permissions | ||
babelfish_server_options | ||
babelfish_sysdatabases | ||
babelfish_syslanguages | ||
babelfish_view_def | ||
service_settings | ||
spt_datatype_info_table | ||
versions | ||
~~END~~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
-- function to list all the babelfish catalogs that has not been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL) | ||
GO | ||
|
||
-- function to list all the babelfish catalogs that has been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL) | ||
GO | ||
-- list all the babel catalogs that has not been analyzed manually during extension create | ||
-- will return NULL in this case | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL order by relname | ||
Go | ||
~~START~~ | ||
varchar | ||
~~END~~ | ||
|
||
|
||
-- will return null as all of the catalog has been analyzed during extension create | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
GO | ||
-- list all the babel catalogs that has been analyzed manually during extension create | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL order by relname | ||
Go | ||
~~START~~ | ||
varchar | ||
assemblies | ||
babelfish_authid_login_ext | ||
babelfish_authid_user_ext | ||
babelfish_configurations | ||
babelfish_domain_mapping | ||
babelfish_extended_properties | ||
babelfish_function_ext | ||
babelfish_helpcollation | ||
babelfish_namespace_ext | ||
babelfish_schema_permissions | ||
babelfish_server_options | ||
babelfish_sysdatabases | ||
babelfish_syslanguages | ||
babelfish_view_def | ||
service_settings | ||
spt_datatype_info_table | ||
versions | ||
~~END~~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,35 @@ | ||
|
||
-- list all the babelfish catalogs that has not been analyzed manually after upgrade | ||
-- will return null | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
-- list all the babel catalogs that has not been analyzed manually during extension upgrade | ||
-- will return NULL in this case | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL order by relname | ||
GO | ||
~~START~~ | ||
varchar | ||
~~END~~ | ||
|
||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed | ||
GO | ||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed | ||
GO | ||
-- list all the babel catalogs that has been analyzed manually during extension upgrade | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL order by relname | ||
Go | ||
~~START~~ | ||
varchar | ||
assemblies | ||
babelfish_authid_login_ext | ||
babelfish_authid_user_ext | ||
babelfish_configurations | ||
babelfish_domain_mapping | ||
babelfish_extended_properties | ||
babelfish_function_ext | ||
babelfish_helpcollation | ||
babelfish_namespace_ext | ||
babelfish_schema_permissions | ||
babelfish_server_options | ||
babelfish_sysdatabases | ||
babelfish_syslanguages | ||
babelfish_view_def | ||
service_settings | ||
spt_datatype_info_table | ||
versions | ||
~~END~~ | ||
|
21 changes: 4 additions & 17 deletions
21
test/JDBC/input/AUTO_ANALYZE-before-15-5-or-14-10-vu-prepare.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,5 @@ | ||
-- function to list all the babelfish catalogs that has not been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL) | ||
GO | ||
|
||
-- function to list all the babelfish catalogs that has been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL) | ||
GO | ||
|
||
|
||
-- will return null as none of the catalog has been analyzed | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_been_analyzed() | ||
GO | ||
-- list all the babel catalogs that has been analyzed manually during extension create | ||
-- will return NULL in this case | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL order by relname | ||
Go |
13 changes: 6 additions & 7 deletions
13
test/JDBC/input/AUTO_ANALYZE-before-15-5-or-14-10-vu-verify.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
|
||
-- list all the babelfish catalogs that has not been analyzed manually after upgrade | ||
-- will return null | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
-- list all the babel catalogs that has not been analyzed manually during extension upgrade | ||
-- will return NULL in this case | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL order by relname | ||
GO | ||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed | ||
GO | ||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed | ||
GO | ||
-- list all the babel catalogs that has been analyzed manually during extension upgrade | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL order by relname | ||
Go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
-- function to list all the babelfish catalogs that has not been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL) | ||
GO | ||
|
||
-- function to list all the babelfish catalogs that has been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL) | ||
GO | ||
-- list all the babel catalogs that has not been analyzed manually during extension create | ||
-- will return NULL in this case | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL order by relname | ||
Go | ||
|
||
|
||
-- will return null as all of the catalog has been analyzed during extension create | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
GO | ||
-- list all the babel catalogs that has been analyzed manually during extension create | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL order by relname | ||
Go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
|
||
-- list all the babelfish catalogs that has not been analyzed manually after upgrade | ||
-- will return null | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
-- list all the babel catalogs that has not been analyzed manually during extension upgrade | ||
-- will return NULL in this case | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL order by relname | ||
GO | ||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed | ||
GO | ||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed | ||
GO | ||
-- list all the babel catalogs that has been analyzed manually during extension upgrade | ||
SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL order by relname | ||
Go |